Bytes adds the field key with val as a string to the *Event context. Runes outside of normal ASCII ranges will be hex-encoded in the resulting JSON.
(key string, val []byte)
| 377 | // Runes outside of normal ASCII ranges will be hex-encoded in the resulting |
| 378 | // JSON. |
| 379 | func (e *Event) Bytes(key string, val []byte) *Event { |
| 380 | if e == nil { |
| 381 | return e |
| 382 | } |
| 383 | e.buf = enc.AppendBytes(enc.AppendKey(e.buf, key), val) |
| 384 | return e |
| 385 | } |
| 386 | |
| 387 | // Hex adds the field key with val as a hex string to the *Event context. |
| 388 | func (e *Event) Hex(key string, val []byte) *Event { |