diff options
author | 2018-04-19 07:41:56 +0100 | |
---|---|---|
committer | 2018-04-19 07:41:56 +0100 | |
commit | 26d1432ae6c19c91fb6358e7629a9179a85b70f7 (patch) | |
tree | 8a9f94cf11dcebf1f079ab478d4ded4bf710c99f /plugin/debug | |
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/debug')
-rw-r--r-- | plugin/debug/README.md | 5 | ||||
-rw-r--r-- | plugin/debug/debug_test.go | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/plugin/debug/README.md b/plugin/debug/README.md index d6fd1b22c..5c97e004e 100644 --- a/plugin/debug/README.md +++ b/plugin/debug/README.md @@ -7,7 +7,8 @@ ## Description Normally CoreDNS will recover from panics, using *debug* inhibits this. The main use of *debug* is -to help testing. +to help testing. A side effect of using *debug* is that `log.Debug` and `log.Debugf` will be printed +to standard output. Note that the *errors* plugin (if loaded) will also set a `recover` negating this setting. @@ -19,7 +20,7 @@ debug ## Examples -Disable the ability to recover from crashes: +Disable the ability to recover from crashes and show debug logging: ~~~ corefile . { diff --git a/plugin/debug/debug_test.go b/plugin/debug/debug_test.go index a4802fee5..45ea42661 100644 --- a/plugin/debug/debug_test.go +++ b/plugin/debug/debug_test.go @@ -1,8 +1,6 @@ package debug import ( - "io/ioutil" - "log" "testing" "github.com/coredns/coredns/core/dnsserver" @@ -11,8 +9,6 @@ import ( ) func TestDebug(t *testing.T) { - log.SetOutput(ioutil.Discard) - tests := []struct { input string shouldErr bool |