2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +00:00

Move serve-stale logging to its own category, so that its verbosity can be curtailed.

This commit is contained in:
Tony Finch
2018-04-10 16:17:57 +01:00
committed by Evan Hunt
parent d1ca21d50a
commit 4b442c309d
4 changed files with 14 additions and 1 deletions

View File

@@ -315,6 +315,17 @@
</para> </para>
</entry> </entry>
</row> </row>
<row rowsep="0">
<entry colname="1">
<para><command>serve-stale</command></para>
</entry>
<entry colname="2">
<para>
Whether or not a stale answer is used
following a resolver failure.
</para>
</entry>
</row>
<row rowsep="0"> <row rowsep="0">
<entry colname="1"> <entry colname="1">
<para><command>spill</command></para> <para><command>spill</command></para>

View File

@@ -28,6 +28,7 @@ LIBNS_EXTERNAL_DATA extern isc_logmodule_t ns_modules[];
#define NS_LOGCATEGORY_UPDATE_SECURITY (&ns_categories[4]) #define NS_LOGCATEGORY_UPDATE_SECURITY (&ns_categories[4])
#define NS_LOGCATEGORY_QUERY_ERRORS (&ns_categories[5]) #define NS_LOGCATEGORY_QUERY_ERRORS (&ns_categories[5])
#define NS_LOGCATEGORY_TAT (&ns_categories[6]) #define NS_LOGCATEGORY_TAT (&ns_categories[6])
#define NS_LOGCATEGORY_SERVE_STALE (&ns_categories[7])
/* /*
* Backwards compatibility. * Backwards compatibility.

View File

@@ -34,6 +34,7 @@ LIBNS_EXTERNAL_DATA isc_logcategory_t ns_categories[] = {
{ "update-security", 0 }, { "update-security", 0 },
{ "query-errors", 0 }, { "query-errors", 0 },
{ "trust-anchor-telemetry", 0 }, { "trust-anchor-telemetry", 0 },
{ "serve-stale", 0 },
{ NULL, 0 } { NULL, 0 }
}; };

View File

@@ -5493,7 +5493,7 @@ query_lookup(query_ctx_t *qctx) {
dns_name_format(qctx->client->query.qname, dns_name_format(qctx->client->query.qname,
namebuf, sizeof(namebuf)); 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, NS_LOGMODULE_QUERY, ISC_LOG_INFO,
"%s resolver failure, stale answer %s", "%s resolver failure, stale answer %s",
namebuf, success ? "used" : "unavailable"); namebuf, success ? "used" : "unavailable");