2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

When loading a configuration file, set log defaults if and only if no

"category default" clause was found in a logging statement.
This commit is contained in:
David Lawrence
2000-03-04 18:30:56 +00:00
parent 5542df0959
commit 4bcc9c7bdc

View File

@@ -962,14 +962,14 @@ load_configuration(const char *filename, ns_server_t *server,
CHECKM(isc_logconfig_create(ns_g_lctx, &logc), CHECKM(isc_logconfig_create(ns_g_lctx, &logc),
"creating new logging configuration"); "creating new logging configuration");
CHECKM(ns_log_setdefaults(logc),
"setting up default logging defaults");
(void) dns_c_ctx_getlogging(configctx, &clog); (void) dns_c_ctx_getlogging(configctx, &clog);
if (clog != NULL) { if (clog != NULL)
CHECKM(ns_log_configure(logc, clog), CHECKM(ns_log_configure(logc, clog),
"configuring logging"); "configuring logging");
} else
CHECKM(ns_log_setdefaults(logc),
"setting up default logging defaults");
result = isc_logconfig_use(ns_g_lctx, logc); result = isc_logconfig_use(ns_g_lctx, logc);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {