Objects constructs a field with the given key, holding a list of the provided objects that can be marshaled by Zap. Note that these objects must implement zapcore.ObjectMarshaler directly. That is, if you're trying to marshal a []Request, the MarshalLogObject method must be declared on the Request
(key string, values []T)
| 128 | // var requests []Request = ... |
| 129 | // logger.Info("sending requests", zap.ObjectValues("requests", requests)) |
| 130 | func Objects[T zapcore.ObjectMarshaler](key string, values []T) Field { |
| 131 | return Array(key, objects[T](values)) |
| 132 | } |
| 133 | |
| 134 | type objects[T zapcore.ObjectMarshaler] []T |
| 135 |