mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
debug level was ignored when logging to stderr
In commit cc167266aa, the -g option was changed so it sets both named_g_logstderr and also named_g_logflags to use ISO style timestamps with tzinfo. Together with an error in named_log_setsafechannels(), that change could cause the debugging level to be ignored.
This commit is contained in:
parent
99b6914a94
commit
96333bc6d7
@ -126,18 +126,20 @@ named_log_setsafechannels(isc_logconfig_t *lcfg) {
|
|||||||
* discarded a bit faster.
|
* discarded a bit faster.
|
||||||
*/
|
*/
|
||||||
isc_log_setdebuglevel(0);
|
isc_log_setdebuglevel(0);
|
||||||
} else if (named_g_logstderr && (named_g_logflags != 0)) {
|
} else if (named_g_logflags != 0) {
|
||||||
/*
|
/*
|
||||||
* If the option -g is given, but we also requested iso
|
* The -g option sets logstderr, and also sets logflags
|
||||||
* timestamps, we'll still need to override the "default_debug"
|
* to print ISO timestamps. Since that isn't the default
|
||||||
* logger with a new one.
|
* behavior, we need to override the "default_debug"
|
||||||
|
* channel with a new one.
|
||||||
*/
|
*/
|
||||||
isc_log_createchannel(lcfg, "default_debug", ISC_LOG_TOFILEDESC,
|
isc_log_createchannel(lcfg, "default_debug", ISC_LOG_TOFILEDESC,
|
||||||
ISC_LOG_DYNAMIC,
|
ISC_LOG_DYNAMIC,
|
||||||
ISC_LOGDESTINATION_STDERR,
|
ISC_LOGDESTINATION_STDERR,
|
||||||
ISC_LOG_PRINTTIME | named_g_logflags);
|
named_g_logflags);
|
||||||
} else {
|
|
||||||
isc_log_setdebuglevel(named_g_debuglevel);
|
isc_log_setdebuglevel(named_g_debuglevel);
|
||||||
|
} else {
|
||||||
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (named_g_logfile != NULL) {
|
if (named_g_logfile != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user