2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

improved error reporting

This commit is contained in:
Andreas Gustafsson
2000-03-01 20:40:33 +00:00
parent 11d435aa4c
commit 0e7a542683

View File

@@ -61,12 +61,12 @@ category_fromconf(dns_c_logcat_t *ccat, isc_logconfig_t *lctx)
case dns_c_cat_default: case dns_c_cat_default:
/* /*
* For now, the default category is the only * For now, the default category is the only
* one that works * one that works.
*/ */
cat = ISC_LOGCATEGORY_DEFAULT; cat = ISC_LOGCATEGORY_DEFAULT;
break; break;
default: default:
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG,
NS_LOGMODULE_SERVER, ISC_LOG_WARNING, NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
"ignoring unsupported logging category"); "ignoring unsupported logging category");
continue; continue;
@@ -74,8 +74,13 @@ category_fromconf(dns_c_logcat_t *ccat, isc_logconfig_t *lctx)
result = isc_log_usechannel(lctx, channelname, cat, result = isc_log_usechannel(lctx, channelname, cat,
NULL); /* XXX module */ NULL); /* XXX module */
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
"logging channel %s: %s", channelname,
isc_result_totext(result));
return (result); return (result);
}
} }
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
@@ -104,7 +109,7 @@ channel_fromconf(dns_c_logchan_t *cchan, isc_logconfig_t *lctx)
(void) dns_c_logchan_getpath(cchan, &path); (void) dns_c_logchan_getpath(cchan, &path);
if (path == NULL) { if (path == NULL) {
isc_log_write(ns_g_lctx, isc_log_write(ns_g_lctx,
NS_LOGCATEGORY_GENERAL, DNS_LOGCATEGORY_CONFIG,
NS_LOGMODULE_SERVER, NS_LOGMODULE_SERVER,
ISC_LOG_ERROR, ISC_LOG_ERROR,
"file log channel has " "file log channel has "