cmd, dashboard, log: log collection and exploration (#17097)
* cmd, dashboard, internal, log, node: logging feature * cmd, dashboard, internal, log: requested changes * dashboard, vendor: gofmt, govendor, use vendored file watcher * dashboard, log: gofmt -s -w, goimports * dashboard, log: gosimple
This commit is contained in:
committed by
Péter Szilágyi
parent
2eedbe799f
commit
a9835c1816
@ -11,6 +11,7 @@ import (
|
||||
const timeKey = "t"
|
||||
const lvlKey = "lvl"
|
||||
const msgKey = "msg"
|
||||
const ctxKey = "ctx"
|
||||
const errorKey = "LOG15_ERROR"
|
||||
const skipLevel = 2
|
||||
|
||||
@ -101,6 +102,7 @@ type RecordKeyNames struct {
|
||||
Time string
|
||||
Msg string
|
||||
Lvl string
|
||||
Ctx string
|
||||
}
|
||||
|
||||
// A Logger writes key/value pairs to a Handler
|
||||
@ -139,6 +141,7 @@ func (l *logger) write(msg string, lvl Lvl, ctx []interface{}, skip int) {
|
||||
Time: timeKey,
|
||||
Msg: msgKey,
|
||||
Lvl: lvlKey,
|
||||
Ctx: ctxKey,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user