Skip to content

Commit

Permalink
add some log to dns lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Feb 12, 2019
1 parent 69e8db7 commit 6c31049
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/dns/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 6c31049

Please sign in to comment.