2016-06-06 16:06:44 -05:00
|
|
|
package log
|
|
|
|
|
|
|
|
type Lvl int
|
|
|
|
|
|
|
|
const (
|
|
|
|
LvlCrit Lvl = iota
|
|
|
|
LvlError
|
|
|
|
LvlWarn
|
|
|
|
LvlInfo
|
|
|
|
LvlDebug
|
|
|
|
)
|
|
|
|
|
|
|
|
type Logger interface {
|
2022-04-01 06:24:39 -05:00
|
|
|
// New returns a new contextual Logger that has this logger's context plus the given context.
|
2022-02-03 09:20:02 -06:00
|
|
|
New(ctx ...interface{}) *ConcreteLogger
|
2016-06-06 16:06:44 -05:00
|
|
|
|
2022-01-06 08:28:05 -06:00
|
|
|
Log(keyvals ...interface{}) error
|
2016-06-06 16:06:44 -05: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{})
|
|
|
|
}
|