mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
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
This commit is contained in:
@@ -2,9 +2,10 @@ package reload
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/coredns/coredns/plugin/pkg/log"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
@@ -36,7 +37,7 @@ func hook(event caddy.EventName, info interface{}) error {
|
||||
// this should be an instance. ok to panic if not
|
||||
instance := info.(*caddy.Instance)
|
||||
md5sum := md5.Sum(instance.Caddyfile().Body())
|
||||
log.Printf("[INFO] Running configuration MD5 = %x\n", md5sum)
|
||||
log.Infof("Running configuration MD5 = %x\n", md5sum)
|
||||
|
||||
go func() {
|
||||
tick := time.NewTicker(r.interval)
|
||||
@@ -57,7 +58,7 @@ func hook(event caddy.EventName, info interface{}) error {
|
||||
r.usage = maybeUsed
|
||||
_, err := instance.Restart(corefile)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Corefile changed but reload failed: %s\n", err)
|
||||
log.Errorf("Corefile changed but reload failed: %s\n", err)
|
||||
continue
|
||||
}
|
||||
// we are done, if the plugin was not set used, then it is not.
|
||||
|
||||
Reference in New Issue
Block a user