Object marshals an object that implement the LogObjectMarshaler interface.
(key string, obj LogObjectMarshaler)
| 71 | |
| 72 | // Object marshals an object that implement the LogObjectMarshaler interface. |
| 73 | func (c Context) Object(key string, obj LogObjectMarshaler) Context { |
| 74 | e := c.l.scratchEvent() |
| 75 | e.Object(key, obj) |
| 76 | c.l.context = enc.AppendObjectData(c.l.context, e.buf) |
| 77 | putEvent(e) |
| 78 | return c |
| 79 | } |
| 80 | |
| 81 | // Objects adds the field key with objs to the logger context as an array of |
| 82 | // objects that implement the LogObjectMarshaler interface. |
no test coverage detected