diff options
author | 2019-08-03 09:31:01 +0000 | |
---|---|---|
committer | 2019-08-03 02:31:01 -0700 | |
commit | fc1e313ca7e0dad73de0db28e5cb9ef2828e6441 (patch) | |
tree | 58dffc58859d9540a7b1301d2c8c568521f88ea6 /plugin | |
parent | 6faff83d7f8eb892f9a7d2388bcdacc4c1baf20b (diff) | |
download | coredns-fc1e313ca7e0dad73de0db28e5cb9ef2828e6441.tar.gz coredns-fc1e313ca7e0dad73de0db28e5cb9ef2828e6441.tar.zst coredns-fc1e313ca7e0dad73de0db28e5cb9ef2828e6441.zip |
plugin/file: unify a serial logging (#3088)
Use %d SOA serial when logging about the SOA serial.
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/file/file.go | 4 | ||||
-rw-r--r-- | plugin/file/reload.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugin/file/file.go b/plugin/file/file.go index 1aebf6cda..d8de85cd3 100644 --- a/plugin/file/file.go +++ b/plugin/file/file.go @@ -58,7 +58,7 @@ func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i if ok { z.TransferIn() } 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 { log.Warningf("Notify from %s for %s: failed primary check: %s", state.IP(), zone, err) @@ -115,7 +115,7 @@ type serialErr struct { } 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. diff --git a/plugin/file/reload.go b/plugin/file/reload.go index eb762ac52..c56d8f37f 100644 --- a/plugin/file/reload.go +++ b/plugin/file/reload.go @@ -38,7 +38,7 @@ func (z *Zone) Reload() error { z.Tree = zone.Tree 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() case <-z.reloadShutdown: |