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

Method CreateDict

context.go:41–43  ·  view source on GitHub ↗

CreateDict creates an Event to be used with the Context.Dict method. It preserves the stack, hooks, and context from the logger. Call usual field methods like Str, Int etc to add fields to this event and give it as argument the Context.Dict method.

()

Source from the content-addressed store, hash-verified

39// Call usual field methods like Str, Int etc to add fields to this
40// event and give it as argument the Context.Dict method.
41func (c Context) CreateDict() *Event {
42 return newEvent(nil, DebugLevel, c.l.stack, c.l.ctx, c.l.hooks)
43}
44
45// CreateArray creates an Array to be used with the Context.Array method.
46// It preserves the stack, hooks, and context from the logger.

Callers

nothing calls this directly

Calls 1

newEventFunction · 0.85

Tested by

no test coverage detected