adding human readability for dns requests debug log (#3751)

This commit is contained in:
Andrei Burd 2018-02-11 17:02:28 +02:00 committed by Preetha
parent e4792dbbee
commit b608091014
1 changed files with 2 additions and 2 deletions

View File

@ -230,8 +230,8 @@ func (d *DNSServer) handleQuery(resp dns.ResponseWriter, req *dns.Msg) {
[]metrics.Label{{Name: "node", Value: d.agent.config.NodeName}}) []metrics.Label{{Name: "node", Value: d.agent.config.NodeName}})
metrics.MeasureSinceWithLabels([]string{"dns", "domain_query"}, s, metrics.MeasureSinceWithLabels([]string{"dns", "domain_query"}, s,
[]metrics.Label{{Name: "node", Value: d.agent.config.NodeName}}) []metrics.Label{{Name: "node", Value: d.agent.config.NodeName}})
d.logger.Printf("[DEBUG] dns: request for %v (%v) from client %s (%s)", d.logger.Printf("[DEBUG] dns: request for name %v type %v class %v (took %v) from client %s (%s)",
q, time.Since(s), resp.RemoteAddr().String(), q.Name, dns.Type(q.Qtype), dns.Class(q.Qclass), time.Since(s), resp.RemoteAddr().String(),
resp.RemoteAddr().Network()) resp.RemoteAddr().Network())
}(time.Now()) }(time.Now())