Dict adds the field key with the dict to the logger context.
(key string, dict *Event)
| 28 | |
| 29 | // Dict adds the field key with the dict to the logger context. |
| 30 | func (c Context) Dict(key string, dict *Event) Context { |
| 31 | dict.buf = enc.AppendEndMarker(dict.buf) |
| 32 | c.l.context = append(enc.AppendKey(c.l.context, key), dict.buf...) |
| 33 | putEvent(dict) |
| 34 | return c |
| 35 | } |
| 36 | |
| 37 | // CreateDict creates an Event to be used with the Context.Dict method. |
| 38 | // It preserves the stack, hooks, and context from the logger. |
nothing calls this directly
no test coverage detected