diff options
author | 2018-04-19 07:41:56 +0100 | |
---|---|---|
committer | 2018-04-19 07:41:56 +0100 | |
commit | 26d1432ae6c19c91fb6358e7629a9179a85b70f7 (patch) | |
tree | 8a9f94cf11dcebf1f079ab478d4ded4bf710c99f /plugin/file/file.go | |
parent | 2095eb7979f53618180f759d0e68e4070554870d (diff) | |
download | coredns-26d1432ae6c19c91fb6358e7629a9179a85b70f7.tar.gz coredns-26d1432ae6c19c91fb6358e7629a9179a85b70f7.tar.zst coredns-26d1432ae6c19c91fb6358e7629a9179a85b70f7.zip |
Update all plugins to use plugin/pkg/log (#1694)
* Update all plugins to use plugin/pkg/log
I wish this could have been done with sed. Alas manually changed all
callers to use the new plugin/pkg/log package.
* Error -> Info
* Add docs to debug plugin as well
Diffstat (limited to 'plugin/file/file.go')
-rw-r--r-- | plugin/file/file.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/file/file.go b/plugin/file/file.go index ec7857ca5..d6804e124 100644 --- a/plugin/file/file.go +++ b/plugin/file/file.go @@ -4,9 +4,9 @@ package file import ( "fmt" "io" - "log" "github.com/coredns/coredns/plugin" + "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" "github.com/miekg/dns" @@ -52,24 +52,24 @@ func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i state.SizeAndDo(m) w.WriteMsg(m) - log.Printf("[INFO] Notify from %s for %s: checking transfer", state.IP(), zone) + log.Infof("Notify from %s for %s: checking transfer", state.IP(), zone) ok, err := z.shouldTransfer() if ok { z.TransferIn() } else { - log.Printf("[INFO] Notify from %s for %s: no serial increase seen", state.IP(), zone) + log.Infof("Notify from %s for %s: no serial increase seen", state.IP(), zone) } if err != nil { - log.Printf("[WARNING] 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) } return dns.RcodeSuccess, nil } - log.Printf("[INFO] Dropping notify from %s for %s", state.IP(), zone) + log.Infof("Dropping notify from %s for %s", state.IP(), zone) return dns.RcodeSuccess, nil } if z.Expired != nil && *z.Expired { - log.Printf("[ERROR] Zone %s is expired", zone) + log.Errorf("Zone %s is expired", zone) return dns.RcodeServerFailure, nil } |