mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* migrate log15 to gokit/log * fix console log * update some unittest * fix all unittest * fix the build * Update pkg/infra/log/log.go Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com> * general type vector * correct the level key Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
25 lines
500 B
Go
25 lines
500 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{}) MultiLoggers
|
|
|
|
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{})
|
|
}
|