DNS logging optimized

This commit is contained in:
Torben Nehmer 2021-08-24 16:41:06 +02:00
parent fbf10f9d1b
commit 2feb864551

View File

@ -66,14 +66,14 @@ func DNSUpdateEntry(domain string, hostname string, ip4 net.IP, ip6 net.IP) erro
msg.Insert(rrs)
log.Printf("Sending DNS Update: %v", msg)
log.Printf("Sending DNS Update for %s.%s:\n%v", hostname, domain, msg)
reply, _, err := dnsClient.Exchange(msg, C.DNS.Server)
if err != nil {
return fmt.Errorf("failed to execute DNS Udpate: %v", err)
}
log.Printf("Received DNS Update Reply: %v", reply)
log.Printf("Received DNS Update Reply for %s.%s:\n%v", hostname, domain, reply)
return nil
}