Hex adds the field key with val as a hex string to the *Event context.
(key string, val []byte)
| 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 { |
| 389 | if e == nil { |
| 390 | return e |
| 391 | } |
| 392 | e.buf = enc.AppendHex(enc.AppendKey(e.buf, key), val) |
| 393 | return e |
| 394 | } |
| 395 | |
| 396 | // RawJSON adds already encoded JSON to the log line under key. |
| 397 | // |