diff options
author | 2018-05-10 03:04:46 +0100 | |
---|---|---|
committer | 2018-05-09 19:04:46 -0700 | |
commit | 874a9986971e0efe27eaec92c523d563dfa8d1f7 (patch) | |
tree | 73fe049679c23e35218a2b8a35c3cfce76e5ac4f /plugin/errors/setup.go | |
parent | 5e7c39911740025d020964922c2a5dc1df36a723 (diff) | |
download | coredns-874a9986971e0efe27eaec92c523d563dfa8d1f7.tar.gz coredns-874a9986971e0efe27eaec92c523d563dfa8d1f7.tar.zst coredns-874a9986971e0efe27eaec92c523d563dfa8d1f7.zip |
plugin/errors: remove panic/recover (#1777)
Remove panic/recover and also use pkg/log to print the error. This
brings some consistency into the logging.
Fixes #1776
Diffstat (limited to 'plugin/errors/setup.go')
-rw-r--r-- | plugin/errors/setup.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/plugin/errors/setup.go b/plugin/errors/setup.go index 082f222b0..d90928f74 100644 --- a/plugin/errors/setup.go +++ b/plugin/errors/setup.go @@ -2,8 +2,6 @@ package errors import ( "fmt" - "log" - "os" "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" @@ -24,8 +22,6 @@ func setup(c *caddy.Controller) error { return plugin.Error("errors", err) } - handler.Log = log.New(os.Stdout, "", 0) - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { handler.Next = next return handler @@ -47,12 +43,10 @@ func errorsParse(c *caddy.Controller) (errorHandler, error) { args := c.RemainingArgs() switch len(args) { case 0: - handler.LogFile = "stdout" case 1: if args[0] != "stdout" { return handler, fmt.Errorf("invalid log file: %s", args[0]) } - handler.LogFile = args[0] default: return handler, c.ArgErr() } |