From b6080910144a08e24ed11bde5f3eedb995851c19 Mon Sep 17 00:00:00 2001 From: Andrei Burd Date: Sun, 11 Feb 2018 17:02:28 +0200 Subject: [PATCH] adding human readability for dns requests debug log (#3751) --- agent/dns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/dns.go b/agent/dns.go index c842f07136..b809a2b3a3 100644 --- a/agent/dns.go +++ b/agent/dns.go @@ -230,8 +230,8 @@ func (d *DNSServer) handleQuery(resp dns.ResponseWriter, req *dns.Msg) { []metrics.Label{{Name: "node", Value: d.agent.config.NodeName}}) metrics.MeasureSinceWithLabels([]string{"dns", "domain_query"}, s, []metrics.Label{{Name: "node", Value: d.agent.config.NodeName}}) - d.logger.Printf("[DEBUG] dns: request for %v (%v) from client %s (%s)", - q, time.Since(s), resp.RemoteAddr().String(), + d.logger.Printf("[DEBUG] dns: request for name %v type %v class %v (took %v) from client %s (%s)", + q.Name, dns.Type(q.Qtype), dns.Class(q.Qclass), time.Since(s), resp.RemoteAddr().String(), resp.RemoteAddr().Network()) }(time.Now())