ByteString constructs a field that carries UTF-8 encoded text as a []byte. To log opaque binary blobs (which aren't necessarily valid UTF-8), use Binary.
(key string, val []byte)
| 81 | // To log opaque binary blobs (which aren't necessarily valid UTF-8), use |
| 82 | // Binary. |
| 83 | func ByteString(key string, val []byte) Field { |
| 84 | return Field{Key: key, Type: zapcore.ByteStringType, Interface: val} |
| 85 | } |
| 86 | |
| 87 | // Complex128 constructs a field that carries a complex number. Unlike most |
| 88 | // numeric fields, this costs an allocation (to convert the complex128 to |
no outgoing calls