Do messages from stderr follow a certain format?
I've seen errors prefixed with 'Error:' and warnings prefixed with 'Warning:'.
Are other log levels written to stderr? How consistent is use of the prefixes?
Thank you for your time.
Errors and Warnings from the API routines are always returned as Error and Warning tags, so they will be prefixed with Error: or Warning: in the output (depending on your output format). Generally, these go to stdout with the rest of the tags, but they go to stderr if any of these are true:
1. You are using the -b option for binary output.
2. You are using the -p output-formatting option.
3. You command to read metadata returned no tags.
4. You are writing metadata.
The exiftool app also generates its own warnings. These may or may not be preceded by "Warning:", and all go to stderr. Here is a more-or-less complete list of app errors/warnings:
Error: '${outfile}' already exists - $infile
Error: [Win32::FindFile] $evalWarning - $wildfile
Error: $err - $infile
Error: $info->{Error} - $file
Error: Bad pattern match for file $file
Error: Can't create file with zero-length name from $orig
Error: File not found - $file
Error: Insecure zip file name. Skipped
Error: Nothing to write - $file
Error: Temporary file already exists: $outfile
Error: Zero-length file name - ""
Warning: [Win32::FindFile] $evalWarning - $dir
Warning: New file name is empty - $ infile
Warning: No writable tags set from $file
Warning: Unicode::GCString problem. Columns may be misaligned
-stay_open already active
-stay_open wasn't active
All tags excluded -- nothing to do.
Can't list tags for specific IFD
Can't overwrite in place when -o option is used
Can't specify tags when $verb originals
Can't use -delete_original when writing.
Can't write $type files
Condition: $evalWarning - $file
Couldn't overwrite in place - $file
End called - $file
EndDir called - $path
Error erasing original $file
Error opening '${efile}' for append
Error opening $file for writing
Error opening directory $dir
Error opening file $file
Error reading $file
Error reading from ARGFILE
Error renaming $original
Error renaming temporary file to $dstFile
Error writing to $efile
Expecting argument for -stay_open option
Expecting FMT for -srcfile option
Expecting integer for -listItem option
Expecting output extension for -$_ option
File '${newVal}' does not exist for -tagsFromFile option
File '${testName}' would exist
Ignored -config option (not first on command line)
Ignored superfluous tag name$s or invalid option$s: -$tg
Ignoring -common_args from $ARGV[0] onwards to avoid infinite recursion
Ignoring request to switch to the same -stay_open ARGFILE ($argFile)
Invalid -echo number
Invalid argument for -stay_open
Invalid filename encoding for $file
Invalid TAG name: "$_"
It makes no sense to use -restore_original when writing
Maybe you meant -overwrite_original ?
No file specified
No file with specified extension
No matching files
No SourceFile '${file}' in imported $csv database
(full path: '${absPath}')
Not writing $path
Nothing to do.
Nothing to write
Originals not deleted.
Output file $outfile already exists for $file
Sorry, -w may not be combined with -csv
Sorry, -W may not be combined with -csv, -htmlDump, -j, -p, -t or -X
Tag '${tag}' does not exist
Tag '${tag}' is not writable
Unknown type for -charset option: $1
Wildcards don't work in the directory specification
You were meant to enter any valid $type name, not "$file" literally.
- Phil
Thank you Mr. Harvey.