mirror of https://github.com/status-im/consul.git
adding human readability for dns requests debug log (#3751)
This commit is contained in:
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.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())
|
||||
|
||||
|
|
Loading…
Reference in New Issue