1

I'm setting up at text filter for some of my routines. If I had a list of errors and other messages, as they are displayed in the output, this would make my filtered outputs a lot more versatile.

So far I have these patterns:
^ERROR:
^rsync error:
^skipping non-regular file

Is there documentation or notes on this anywhere?

2 Answers 2

2

I think you'll not find a nice, tidy answer to this question. I did a brute-force search for strings that look like errors in the source code and there is little in the way of organization or patterns that I can see. For example, this is a tiny sampling of overall errors that I found with a simple grep for FERROR (I assume this is a file descriptor for stderr or equivalent)...

"ABORTING due to unsafe pathname from sender: %s\n"
"All source args must come from the same machine.\n"
"Batch file %s open error"
"Daemon option(s) used without --daemon.\n"
"ERROR: Skipping sender remove for changed file: %s\n"
"ERROR: buffer overflow in %s [%s]\n"
"FATAL I/O ERROR: dying to avoid a --delete-%s issue with a pre-3.0.7 receiver.\n"
"Failed to close"
"Hlink node data for %d already has path=%s (%s)\n"
"If arg is a remote file/dir, prefix it with a colon (:).\n"
"Impossible error in external-zlib code (1).\n"
"Integer overflow: attempted 64-bit offset\n"
"Internal hashtable error: illegal key supplied!\n"
"Invalid ID number: %s\n"
"Overflow in read_varint()\n"
"Overflow in read_varlong()\n"
"Unexpected remote arg: %s\n"
"Unknown filter rule: `%s'\n"
"[%s] could not find xattr #%d for %s\n"
"[%s] internal abbrev error on %s (%s, len=%ld)!\n"
"rsync error: %s (code %d) at %s(%d) [%s=%s]\n"
"rsync: did not see server greeting\n"

This is just a small subset of the messages that I found with grep and even that whole set is just a subset of the total overall as a simple grep doesn't catch, for example, messages that aren't on the same line as FERROR (and there are plenty of those).

2
  • It looks like I'll have to write things another way.
    – Lumify
    Oct 27, 2017 at 19:12
  • Yeah. Frankly, the situation is chaos...not uncommon with code bases that go way back.
    – B Layer
    Oct 27, 2017 at 19:14
0

Any successful file transfer should have its transfer status in the form of something like >f..T...... so you could figure out a regex for that and perform a reverse match.

Additionally, rsync's log output format is highly configurable, so you may be able to get what you want by changing that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .