Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contextual ¶
Contextual is an interface that allows context addition to a log statement before calling the final print (message/level) method.
type ContextualExtended ¶
type ContextualExtended interface { LeveledExtended With(fields ...interface{}) LeveledExtended }
ContextualExtended extends Contextual with Print-methods
type ContextualExtendedLogger ¶
type ContextualExtendedLogger interface { Logger ContextualExtended }
type ContextualLogger ¶
type ContextualLogger interface { Logger Contextual }
type Leveled ¶
type Leveled interface { Standard Debug(args ...interface{}) Debugf(format string, args ...interface{}) Debugln(args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Errorln(args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Infoln(args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Warnln(args ...interface{}) }
Leleved is an interface with commonly used log level methods.
type LeveledExtended ¶
type LeveledExtended interface { StandardExtended Leveled }
LeveledExtended extends Leveled with Print-methods
type Logger ¶
type Logger interface {
Log(l Level, args ...interface{})
}
Logger is the basic interface that logs a message with a level. This is separate, since many loggers don't actually implement this method.
type Standard ¶
type Standard interface { Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Fatalln(args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) Panicln(args ...interface{}) }
Standard is the interface used by Go's standard library's log package, except the Print functions, since those are often omitted by loggers. For a version that includes that, see thr "Extended" versions.
type StandardExtended ¶
type StandardExtended interface { Standard Print(args ...interface{}) Printf(format string, args ...interface{}) Println(args ...interface{}) }
StandardExtended is like Standard, but also with print functions. The stdlib logger implements StandardExtended.