Documentation ¶
Overview ¶
Package logger copy from github.com/robfig/cron/[email protected]/logger.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = PrintfLogger(log.New(os.Stdout, "fastProxy: ", log.LstdFlags), os.Stdout)
DefaultLogger is used by Cron if none is specified.
View Source
var DiscardLogger = PrintfLogger(log.New(io.Discard, "", 0), io.Discard)
DiscardLogger can be used by callers to discard all log messages.
View Source
var VerboseLogger = VerbosePrintfLogger(log.New(os.Stdout, "fastProxy: ", log.LstdFlags), os.Stdout)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, keysAndValues ...interface{}) Debugf(template string, args ...interface{}) Info(msg string, keysAndValues ...interface{}) Infof(template string, args ...interface{}) Warn(msg string, keysAndValues ...interface{}) Warnf(template string, args ...interface{}) Error(msg string, keysAndValues ...interface{}) Errorf(template string, args ...interface{}) GetWriter() io.Writer Flush() }
Logger is the interface used in this package for logging, so that any backend can be plugged in. It is a subset of the github.com/go-logr/logr interface.
func PrintfLogger ¶
PrintfLogger wraps a Printf-based logger (such as the standard library "log") into an implementation of the Logger interface which logs errors only.
Click to show internal directories.
Click to hide internal directories.