From: Tony Finch Date: Tue, 10 Apr 2018 15:17:57 +0000 (+0100) Subject: Move serve-stale logging to its own category, so that its verbosity can be curtailed. X-Git-Tag: v9.13.1~28^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b442c309dfb2c8880b19af4133047655bb734df;p=thirdparty%2Fbind9.git Move serve-stale logging to its own category, so that its verbosity can be curtailed. --- diff --git a/doc/arm/logging-categories.xml b/doc/arm/logging-categories.xml index 216ac77fab8..9d3856d4448 100644 --- a/doc/arm/logging-categories.xml +++ b/doc/arm/logging-categories.xml @@ -315,6 +315,17 @@ + + + serve-stale + + + + Whether or not a stale answer is used + following a resolver failure. + + + spill diff --git a/lib/ns/include/ns/log.h b/lib/ns/include/ns/log.h index dd81f64a5b4..aab57aca091 100644 --- a/lib/ns/include/ns/log.h +++ b/lib/ns/include/ns/log.h @@ -28,6 +28,7 @@ LIBNS_EXTERNAL_DATA extern isc_logmodule_t ns_modules[]; #define NS_LOGCATEGORY_UPDATE_SECURITY (&ns_categories[4]) #define NS_LOGCATEGORY_QUERY_ERRORS (&ns_categories[5]) #define NS_LOGCATEGORY_TAT (&ns_categories[6]) +#define NS_LOGCATEGORY_SERVE_STALE (&ns_categories[7]) /* * Backwards compatibility. diff --git a/lib/ns/log.c b/lib/ns/log.c index 636e457bc37..0a321d15a49 100644 --- a/lib/ns/log.c +++ b/lib/ns/log.c @@ -34,6 +34,7 @@ LIBNS_EXTERNAL_DATA isc_logcategory_t ns_categories[] = { { "update-security", 0 }, { "query-errors", 0 }, { "trust-anchor-telemetry", 0 }, + { "serve-stale", 0 }, { NULL, 0 } }; diff --git a/lib/ns/query.c b/lib/ns/query.c index f147baa2022..a656ad7099f 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -5493,7 +5493,7 @@ query_lookup(query_ctx_t *qctx) { dns_name_format(qctx->client->query.qname, namebuf, sizeof(namebuf)); - isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, + isc_log_write(ns_lctx, NS_LOGCATEGORY_SERVE_STALE, NS_LOGMODULE_QUERY, ISC_LOG_INFO, "%s resolver failure, stale answer %s", namebuf, success ? "used" : "unavailable");