import "github.com/coredns/coredns/plugin/pkg/log"
Package log implements a small wrapper around the std lib log package. It implements log levels by prefixing the logs with [INFO], [DEBUG], [WARNING] or [ERROR]. Debug logging is available and enabled if the *debug* plugin is used.
log.Info("this is some logging"), will log on the Info level.
log.Debug("this is debug output"), will log in the Debug level, etc.
var D = &d{}
D controls whether we should output debug logs. If true, we do, once set it can not be unset.
func Debug(v ...interface{})
Debug is equivalent to log.Print(), but prefixed with "[DEBUG] ". It only outputs something if D is true.
Debugf is equivalent to log.Printf(), but prefixed with "[DEBUG] ". It only outputs something if D is true.
func Discard()
Discard sets the log output to /dev/null.
func Error(v ...interface{})
Error is equivalent to log.Print, but prefixed with "[ERROR] ".
Errorf is equivalent to log.Printf, but prefixed with "[ERROR] ".
func Fatal(v ...interface{})
Fatal is equivalent to log.Print, but prefixed with "[FATAL] ", and calling os.Exit(1).
Fatalf is equivalent to log.Printf, but prefixed with "[FATAL] ", and calling os.Exit(1)
func Info(v ...interface{})
Info is equivalent to log.Print, but prefixed with "[INFO] ".
Infof is equivalent to log.Printf, but prefixed with "[INFO] ".
func Warning(v ...interface{})
Warning is equivalent to log.Print, but prefixed with "[WARNING] ".
Warningf is equivalent to log.Printf, but prefixed with "[WARNING] ".
type P struct {
// contains filtered or unexported fields
}
P is a logger that includes the plugin doing the logging.
NewWithPlugin returns a logger that includes "plugin/name: " in the log message. I.e [INFO] plugin/<name>: message.
Debug logs as log.Debug.
Debugf logs as log.Debugf.
Error logs as log.Error.
Errorf logs as log.Errorf.
Fatal logs as log.Fatal and calls os.Exit(1).
Fatalf logs as log.Fatalf and calls os.Exit(1).
Info logs as log.Info.
Infof logs as log.Infof.
Warning logs as log.Warning.
Warningf logs as log.Warningf.
Package log imports 5 packages (graph) and is imported by 443 packages. Updated 2019-10-22. Refresh now. Tools for package owners.