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

Method Objects

context.go:85–91  ·  view source on GitHub ↗

Objects adds the field key with objs to the logger context as an array of objects that implement the LogObjectMarshaler interface. This is the array version that accepts a slice of LogObjectMarshaler objects.

(key string, objs []LogObjectMarshaler)

Source from the content-addressed store, hash-verified

83//
84// This is the array version that accepts a slice of LogObjectMarshaler objects.
85func (c Context) Objects(key string, objs []LogObjectMarshaler) Context {
86 e := c.l.scratchEvent()
87 e.Objects(key, objs)
88 c.l.context = enc.AppendObjectData(c.l.context, e.buf)
89 putEvent(e)
90 return c
91}
92
93// ObjectsV adds the field key with objs to the logger context as an array of
94// objects that implement the LogObjectMarshaler interface.

Callers 1

ObjectsVMethod · 0.95

Calls 3

putEventFunction · 0.85
scratchEventMethod · 0.80
AppendObjectDataMethod · 0.65

Tested by

no test coverage detected