]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move serve-stale logging to its own category, so that its verbosity can be curtailed.
authorTony Finch <dot@dotat.at>
Tue, 10 Apr 2018 15:17:57 +0000 (16:17 +0100)
committerEvan Hunt <each@isc.org>
Sat, 26 May 2018 05:00:51 +0000 (22:00 -0700)
doc/arm/logging-categories.xml
lib/ns/include/ns/log.h
lib/ns/log.c
lib/ns/query.c

index 216ac77fab8338ca103033cc63b0bea193f15ded..9d3856d4448f4fa490c8bb045fa7b7b715239a3e 100644 (file)
          </para>
        </entry>
       </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">
        <entry colname="1">
          <para><command>spill</command></para>
index dd81f64a5b44521860c884b9c6f86f2be946c368..aab57aca091cf97858e8c6bee4549d06503457b7 100644 (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_QUERY_ERRORS    (&ns_categories[5])
 #define NS_LOGCATEGORY_TAT             (&ns_categories[6])
+#define NS_LOGCATEGORY_SERVE_STALE     (&ns_categories[7])
 
 /*
  * Backwards compatibility.
index 636e457bc377ad193d0c7d3f5919c3dedc23331b..0a321d15a49c710393cba4f7f6ba13e419df115b 100644 (file)
@@ -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 }
 };
 
index f147baa20229a96e1d706b8cf8bcbb08c94c3a3a..a656ad7099f8e8c47a9755b1b55a562f791f009b 100644 (file)
@@ -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");