aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/log/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/pkg/log/plugin.go')
-rw-r--r--plugin/pkg/log/plugin.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugin/pkg/log/plugin.go b/plugin/pkg/log/plugin.go
index c79d657c7..354c19d3f 100644
--- a/plugin/pkg/log/plugin.go
+++ b/plugin/pkg/log/plugin.go
@@ -3,8 +3,6 @@ package log
import (
"fmt"
golog "log"
-
- "github.com/coredns/coredns/plugin"
)
// P is a logger that includes the plugin doing the logging.
@@ -12,9 +10,9 @@ type P struct {
plugin string
}
-// NewWithPlugin return a logger that shows the plugin that logs the message.
+// NewWithPlugin returns a logger that includes "plugin/name: " in the log message.
// I.e [INFO] plugin/<name>: message.
-func NewWithPlugin(h plugin.Handler) P { return P{h.Name()} }
+func NewWithPlugin(name string) P { return P{name} }
func (p P) logf(level, format string, v ...interface{}) {
s := level + pFormat(p.plugin) + fmt.Sprintf(format, v...)