]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_11] render querylog format consistent, and add a release note
authorEvan Hunt <each@isc.org>
Thu, 22 Sep 2016 21:49:26 +0000 (14:49 -0700)
committerEvan Hunt <each@isc.org>
Thu, 22 Sep 2016 21:49:26 +0000 (14:49 -0700)
4471. [cleanup] Render client/query logging format consistent for
ease of log file parsing. (Note that this affects
"querylog" format: there is now an additional field
indicating the client object address.) [RT #43238]

(cherry picked from commit c4b7db49326be650fa95a7ede6e066bbe1268561)

CHANGES
bin/named/client.c
doc/arm/notes.xml

diff --git a/CHANGES b/CHANGES
index 712480d95a16e31c5fdfeb2bcf8286ee1fca4e36..10f0573b58fc79fff0d84664fbe39a29a9441d7d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
        --- 9.11.0rc3 released ---
 
+4471.  [cleanup]       Render client/query logging format consistent for
+                       ease of log file parsing. (Note that this affects
+                       "querylog" format: there is now an additional field
+                       indicating the client object address.) [RT #43238]
+
 4470.  [bug]           Reset message with intent parse before
                        calling dns_dispatch_getnext. [RT #43229]
 
index f4469d83630995d6812ae3353ff32a37f0ead859..4b2f4b0b50eedadb28b9231f0aa537ca9f95bbed 100644 (file)
@@ -3688,6 +3688,7 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
 {
        char msgbuf[4096];
        char signerbuf[DNS_NAME_FORMATSIZE], qnamebuf[DNS_NAME_FORMATSIZE];
+       char peerbuf[ISC_SOCKADDR_FORMATSIZE];
        const char *viewname = "";
        const char *sep1 = "", *sep2 = "", *sep3 = "", *sep4 = "";
        const char *signer = "", *qname = "";
@@ -3717,20 +3718,16 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
        }
 
        if (client->peeraddr_valid) {
-               char peerbuf[ISC_SOCKADDR_FORMATSIZE];
-
                isc_sockaddr_format(&client->peeraddr,
                                    peerbuf, sizeof(peerbuf));
-               isc_log_write(ns_g_lctx, category, module, level,
-                             "client @%p %s%s%s%s%s%s%s%s: %s",
-                             client, peerbuf, sep1, signer, sep2, qname, sep3,
-                             sep4, viewname, msgbuf);
        } else {
-               isc_log_write(ns_g_lctx, category, module, level,
-                             "client @%p%s%s%s%s%s%s%s: %s",
-                             client, sep1, signer, sep2, qname, sep3,
-                             sep4, viewname, msgbuf);
+               snprintf(peerbuf, sizeof(peerbuf), "(no-peer)");
        }
+
+       isc_log_write(ns_g_lctx, category, module, level,
+                     "client @%p %s%s%s%s%s%s%s%s: %s",
+                     client, peerbuf, sep1, signer, sep2, qname, sep3,
+                     sep4, viewname, msgbuf);
 }
 
 void
index 0881a2e9cb26a01550b3f16d27bf034e1d1c0985..e02114b93d75700c199fe6fedb0b1386dd7e4e6e 100644 (file)
   <section xml:id="relnotes_changes"><info><title>Feature Changes</title></info>
     <itemizedlist>
       <listitem>
+       <para>
+         The logging format used for <command>querylog</command> has been
+         altered. It now includes an additional field indicating the
+         address in memory of the client object processing the query.
+       </para>
        <para>
          The ISC DNSSEC Lookaside Validation (DLV) service is scheduled
          to be disabled in 2017.  A warning is now logged when