grafana/pkg/infra/log/interface.go

25 lines
515 B
Go
Raw Normal View History

package log
type Lvl int
const (
LvlCrit Lvl = iota
LvlError
LvlWarn
LvlInfo
LvlDebug
)
type Logger interface {
// 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
Log(keyvals ...interface{}) error
// 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{})
}