From fcadf0b3205be950da14c80fedbf088fc8fd2190 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 22 Sep 2016 14:49:26 -0700 Subject: [PATCH] [v9_11] render querylog format consistent, and add a release note 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 | 5 +++++ bin/named/client.c | 17 +++++++---------- doc/arm/notes.xml | 5 +++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 712480d95a..10f0573b58 100644 --- 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] diff --git a/bin/named/client.c b/bin/named/client.c index f4469d8363..4b2f4b0b50 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -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 diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index 0881a2e9cb..e02114b93d 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -640,6 +640,11 @@
Feature Changes + + The logging format used for querylog has been + altered. It now includes an additional field indicating the + address in memory of the client object processing the query. + The ISC DNSSEC Lookaside Validation (DLV) service is scheduled to be disabled in 2017. A warning is now logged when