EmbedObject marshals an object that implement the LogObjectMarshaler interface.
(obj LogObjectMarshaler)
| 301 | |
| 302 | // EmbedObject marshals an object that implement the LogObjectMarshaler interface. |
| 303 | func (e *Event) EmbedObject(obj LogObjectMarshaler) *Event { |
| 304 | if e == nil { |
| 305 | return e |
| 306 | } |
| 307 | if obj == nil { |
| 308 | return e |
| 309 | } |
| 310 | obj.MarshalZerologObject(e) |
| 311 | return e |
| 312 | } |
| 313 | |
| 314 | // Str adds the field key with val as a string to the *Event context. |
| 315 | func (e *Event) Str(key, val string) *Event { |