Documentation ¶
Overview ¶
Package log provides leveled logging interface. The log messages are intended to be user-facing similar to the standard library's log package.
Index ¶
- Variables
- type Level
- type Logger
- func (l *Logger) Debugf(msg string, args ...interface{})
- func (l *Logger) Errorf(msg string, args ...interface{})
- func (l *Logger) Infof(msg string, args ...interface{})
- func (l *Logger) Level() Level
- func (l *Logger) Log(level Level, msg string, args ...interface{})
- func (l *Logger) WithLevel(lvl Level) *Logger
- func (l *Logger) WithName(name string) *Logger
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var Discard = New(io.Discard).WithLevel(discard)
Discard is a logger that discards all its operations.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a thread-safe logger safe for concurrent use.
func (*Logger) Level ¶
Level reports the level of the logger. The logger will only log messages of this level or higher.
Click to show internal directories.
Click to hide internal directories.