2
0
mirror of https://github.com/status-im/consul.git synced 2025-01-14 07:44:50 +00:00

adding human readability for dns requests debug log ()

This commit is contained in:
Andrei Burd 2018-02-11 17:02:28 +02:00 committed by Preetha
parent e4792dbbee
commit b608091014

@ -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())