Reduce log verbosity when ignore_system_dns = true

Fixes #81
This commit is contained in:
Frank Denis 2018-02-03 10:25:41 +01:00
parent db973f1aa9
commit 67b0d95ea1
1 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,11 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
msg := new(dns.Msg)
msg.SetQuestion(dns.Fqdn(host), dns.TypeA)
msg.SetEdns0(4096, true)
dlog.Noticef("System DNS configuration not usable yet, exceptionally resolving [%s] using fallback resolver [%s]", host, xTransport.fallbackResolver)
if !xTransport.ignoreSystemDNS {
dlog.Noticef("System DNS configuration not usable yet, exceptionally resolving [%s] using fallback resolver [%s]", host, xTransport.fallbackResolver)
} else {
dlog.Debugf("Resolving [%s] using fallback resolver [%s]", host, xTransport.fallbackResolver)
}
in, _, err := dnsClient.Exchange(msg, xTransport.fallbackResolver)
if err != nil {
return nil, 0, err