Array constructs a field with the given key and ArrayMarshaler. It provides a flexible, but still type-safe and efficient, way to add array-like types to the logging context. The struct's MarshalLogArray method is called lazily.
(key string, val zapcore.ArrayMarshaler)
| 31 | // a flexible, but still type-safe and efficient, way to add array-like types |
| 32 | // to the logging context. The struct's MarshalLogArray method is called lazily. |
| 33 | func Array(key string, val zapcore.ArrayMarshaler) Field { |
| 34 | return Field{Key: key, Type: zapcore.ArrayMarshalerType, Interface: val} |
| 35 | } |
| 36 | |
| 37 | // Bools constructs a field that carries a slice of bools. |
| 38 | func Bools(key string, bs []bool) Field { |
no outgoing calls