Remove unneeded debug prints
This commit is contained in:
parent
751be05a31
commit
8d13770b0d
|
@ -242,9 +242,10 @@ func (p *plug) parseEtcHosts(text string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, host := range fields[1:] {
|
for _, host := range fields[1:] {
|
||||||
if val, ok := p.hosts[host]; ok {
|
// debug logging for duplicate values, pretty common if you subscribe to many hosts files
|
||||||
log.Printf("warning: host %s already has value %s, will overwrite it with %s", host, val, addr)
|
// if val, ok := p.hosts[host]; ok {
|
||||||
}
|
// log.Printf("warning: host %s already has value %s, will overwrite it with %s", host, val, addr)
|
||||||
|
// }
|
||||||
p.hosts[host] = addr
|
p.hosts[host] = addr
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -323,7 +324,7 @@ func (p *plug) replaceHostWithValAndReply(ctx context.Context, w dns.ResponseWri
|
||||||
// check if it's a domain name or IP address
|
// check if it's a domain name or IP address
|
||||||
addr := net.ParseIP(val)
|
addr := net.ParseIP(val)
|
||||||
var records []dns.RR
|
var records []dns.RR
|
||||||
log.Println("Will give", val, "instead of", host)
|
// log.Println("Will give", val, "instead of", host) // debug logging
|
||||||
if addr != nil {
|
if addr != nil {
|
||||||
// this is an IP address, return it
|
// this is an IP address, return it
|
||||||
result, err := dns.NewRR(fmt.Sprintf("%s %d A %s", host, p.settings.BlockedTTL, val))
|
result, err := dns.NewRR(fmt.Sprintf("%s %d A %s", host, p.settings.BlockedTTL, val))
|
||||||
|
|
|
@ -221,7 +221,7 @@ func genericLoader(onEntry func(entry *logEntry) error, needMore func() bool, ti
|
||||||
}
|
}
|
||||||
|
|
||||||
if now.Sub(entry.Time) > timeWindow {
|
if now.Sub(entry.Time) > timeWindow {
|
||||||
trace("skipping entry")
|
// trace("skipping entry") // debug logging
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue