Duration constructs a field with the given key and value. The encoder controls how the duration is serialized.
(key string, val time.Duration)
| 381 | // Duration constructs a field with the given key and value. The encoder |
| 382 | // controls how the duration is serialized. |
| 383 | func Duration(key string, val time.Duration) Field { |
| 384 | return Field{Key: key, Type: zapcore.DurationType, Integer: int64(val)} |
| 385 | } |
| 386 | |
| 387 | // Durationp constructs a field that carries a *time.Duration. The returned Field will safely |
| 388 | // and explicitly represent `nil` when appropriate. |
no outgoing calls