Binary constructs a field that carries an opaque binary blob. Binary data is serialized in an encoding-appropriate format. For example, zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, use ByteString.
(key string, val []byte)
| 56 | // zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, |
| 57 | // use ByteString. |
| 58 | func Binary(key string, val []byte) Field { |
| 59 | return Field{Key: key, Type: zapcore.BinaryType, Interface: val} |
| 60 | } |
| 61 | |
| 62 | // Bool constructs a field that carries a bool. |
| 63 | func Bool(key string, val bool) Field { |
no outgoing calls