diff options
Diffstat (limited to 'log/logger.go')
-rw-r--r-- | log/logger.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/log/logger.go b/log/logger.go index 438aa548f..ca3e0b059 100644 --- a/log/logger.go +++ b/log/logger.go @@ -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, }, }) } |