2016-06-06 23:06:44 +02:00
|
|
|
package log
|
|
|
|
|
|
|
|
|
|
type Lvl int
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
LvlCrit Lvl = iota
|
|
|
|
|
LvlError
|
|
|
|
|
LvlWarn
|
|
|
|
|
LvlInfo
|
|
|
|
|
LvlDebug
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Logger interface {
|
2022-04-01 13:24:39 +02:00
|
|
|
// New returns a new contextual Logger that has this logger's context plus the given context.
|
2022-02-03 16:20:02 +01:00
|
|
|
New(ctx ...interface{}) *ConcreteLogger
|
2016-06-06 23:06:44 +02:00
|
|
|
|
2022-01-06 15:28:05 +01:00
|
|
|
Log(keyvals ...interface{}) error
|
2016-06-06 23:06:44 +02:00
|
|
|
|
|
|
|
|
// Log a message at the given level with context key/value pairs
|
|
|
|
|
Debug(msg string, ctx ...interface{})
|
|
|
|
|
Info(msg string, ctx ...interface{})
|
|
|
|
|
Warn(msg string, ctx ...interface{})
|
|
|
|
|
Error(msg string, ctx ...interface{})
|
|
|
|
|
}
|