Reform logging in weaveDNS
* Put prefixes (including msg IDs) in front of log messages to distinguish them * Failed lookups get logged under Info as per issue #311 * More accurate messages as per issue #311
This commit is contained in:
1 parent
f70dfe9de8
commit
b114735a41
7 files changed
+34
-28
No files matched your search
+2
-2
@@ -76,7 +76,7 @@ func (zone *ZoneDb) ReverseLookupLocal(inaddr string) (string, error) {
|
||||
if revIP := net.ParseIP(inaddr[:len(inaddr)-rdnsDomainLen]); revIP != nil {
|
||||
revIP4 := revIP.To4()
|
||||
ip := []byte{revIP4[3], revIP4[2], revIP4[1], revIP4[0]}
|
||||
Debug.Printf("Looking for address: %+v", ip)
|
||||
Debug.Printf("[zonedb] Looking for address: %+v", ip)
|
||||
zone.mx.RLock()
|
||||
defer zone.mx.RUnlock()
|
||||
for _, r := range zone.recs {
|
||||
@@ -86,7 +86,7 @@ func (zone *ZoneDb) ReverseLookupLocal(inaddr string) (string, error) {
|
||||
}
|
||||
return "", LookupError(inaddr)
|
||||
} else {
|
||||
Warning.Printf("Asked to reverse lookup %s", inaddr)
|
||||
Warning.Printf("[zonedb] Asked to reverse lookup %s", inaddr)
|
||||
return "", LookupError(inaddr)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user