grafana/pkg/infra/log/interface.go
2022-02-03 23:20:02 +08:00

25 lines
503 B
Go

package log
type Lvl int
const (
LvlCrit Lvl = iota
LvlError
LvlWarn
LvlInfo
LvlDebug
)
type Logger interface {
// New returns a new Logger that has this logger's context plus the given context
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{})
}