MCPcopy
hub / github.com/rs/zerolog / Dict

Method Dict

context.go:30–35  ·  view source on GitHub ↗

Dict adds the field key with the dict to the logger context.

(key string, dict *Event)

Source from the content-addressed store, hash-verified

28
29// Dict adds the field key with the dict to the logger context.
30func (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.

Callers

nothing calls this directly

Calls 3

putEventFunction · 0.85
AppendEndMarkerMethod · 0.65
AppendKeyMethod · 0.65

Tested by

no test coverage detected