Fix gbak output some errors and warnings to stderr instead of stdout#8793
Fix gbak output some errors and warnings to stderr instead of stdout#8793XaBbl4 wants to merge 1 commit intoFirebirdSQL:masterfrom
Conversation
|
Earlier the following approach was used - errors that may be recovered by gbak were going to stdout, fatal - to stderr. I can agree that putting recoverable errors into stderr makes sense. Bit why not all? Something like: in restore.epp is left in stdout but in backup.epp will go into stderr. I want to know what criteria was used to keep some messages in stdout. |
|
Initially, during the restore, I tried to capture only those errors that didn't bring the database online when the utility terminated. As I mentioned in the first message, I might have missed some places, as I couldn't reproduce every case; this is likely one of them. In the backup, I moved all BURP_print calls to the error stream, not seeing the logic for splitting the output. |
Currently in standalone application mode when redirect to the standard stream, for example:
gbak ... > /path/to/stdout.logsome error and warning messages may be missed, which may cause inconvenience.
For example, during when restore we may see an error message:
but in order to find out which index remains inactive, we need to look at the entire log, and in it we can already find:
Although in the global community it is accepted to output all errors and warnings to stderr.
This patch fixes this bug. I tried to cover all the cases found, but may have missed something.
I believe
BURP_print_statusshould always output to stderr, regardless of whether theerrargument is set to true or not. Theerrargument is now only responsible for setting status in service mode. AlsoBURP_print_warningshould always output to stderr.