Fix gbak output some errors and warnings to stderr instead of stdout
Currently in standalone application mode when redirect to the standard stream, for example:
gbak ... > /path/to/stdout.log
some error and warning messages may be missed, which may cause inconvenience.
For example, during when restore we may see an error message:
gbak: ERROR:Database is not online due to failure to activate one or more indices.
gbak: ERROR: Run gfix -online to bring database online without active indices.
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:
gbak:cannot commit index TEST_INDEX
gbak: ERROR:attempt to store duplicate value (visible to active transactions) in unique index "TEST_INDEX"
gbak: ERROR: Problematic key value is ("ID" = 1)
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_status should always output to stderr, regardless of whether the err argument is set to true or not. The err argument is now only responsible for setting status in service mode. Also BURP_print_warning should always output to stderr.