EmbedObject marshals and Embeds an object that implement the LogObjectMarshaler interface.
(obj LogObjectMarshaler)
| 100 | |
| 101 | // EmbedObject marshals and Embeds an object that implement the LogObjectMarshaler interface. |
| 102 | func (c Context) EmbedObject(obj LogObjectMarshaler) Context { |
| 103 | e := c.l.scratchEvent() |
| 104 | e.EmbedObject(obj) |
| 105 | c.l.context = enc.AppendObjectData(c.l.context, e.buf) |
| 106 | putEvent(e) |
| 107 | return c |
| 108 | } |
| 109 | |
| 110 | // Str adds the field key with val as a string to the logger context. |
| 111 | func (c Context) Str(key, val string) Context { |
nothing calls this directly
no test coverage detected