Commit fc1e313c authored by Miek Gieben's avatar Miek Gieben Committed by Yong Tang

plugin/file: unify a serial logging (#3088)

Use %d SOA serial when logging about the SOA serial.
Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent 6faff83d
...@@ -58,7 +58,7 @@ func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i ...@@ -58,7 +58,7 @@ func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
if ok { if ok {
z.TransferIn() z.TransferIn()
} else { } else {
log.Infof("Notify from %s for %s: no serial increase seen", state.IP(), zone) log.Infof("Notify from %s for %s: no SOA serial increase seen", state.IP(), zone)
} }
if err != nil { if err != nil {
log.Warningf("Notify from %s for %s: failed primary check: %s", state.IP(), zone, err) log.Warningf("Notify from %s for %s: failed primary check: %s", state.IP(), zone, err)
...@@ -115,7 +115,7 @@ type serialErr struct { ...@@ -115,7 +115,7 @@ type serialErr struct {
} }
func (s *serialErr) Error() string { func (s *serialErr) Error() string {
return fmt.Sprintf("%s for origin %s in file %s, with serial %d", s.err, s.origin, s.zone, s.serial) return fmt.Sprintf("%s for origin %s in file %s, with %d SOA serial", s.err, s.origin, s.zone, s.serial)
} }
// Parse parses the zone in filename and returns a new Zone or an error. // Parse parses the zone in filename and returns a new Zone or an error.
......
...@@ -38,7 +38,7 @@ func (z *Zone) Reload() error { ...@@ -38,7 +38,7 @@ func (z *Zone) Reload() error {
z.Tree = zone.Tree z.Tree = zone.Tree
z.Unlock() z.Unlock()
log.Infof("Successfully reloaded zone %q in %q with serial %d", z.origin, zFile, z.Apex.SOA.Serial) log.Infof("Successfully reloaded zone %q in %q with %d SOA serial", z.origin, zFile, z.Apex.SOA.Serial)
z.Notify() z.Notify()
case <-z.reloadShutdown: case <-z.reloadShutdown:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment