From 6c310492958ca97fc40f07d7c29fcc92d5548db0 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 12 Feb 2019 21:04:28 +0100 Subject: [PATCH] add some log to dns lookup --- app/dns/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/dns/server.go b/app/dns/server.go index 9432d995..351ed7ef 100644 --- a/app/dns/server.go +++ b/app/dns/server.go @@ -206,6 +206,7 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err ips := s.lookupStatic(domain, option, 0) if ips != nil && ips[0].Family().IsIP() { + newError("returning ", len(ips), " IPs for domain ", domain).WriteToLog() return toNetIP(ips), nil } @@ -220,6 +221,7 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err idx := s.domainMatcher.Match(domain) if idx > 0 { ns := s.clients[s.domainIndexMap[idx]] + newError("querying domain ", domain, " at ", ns.Name()).WriteToLog() ips, err := s.queryIPTimeout(ns, domain, option) if len(ips) > 0 { return ips, nil