()
| 527 | } |
| 528 | |
| 529 | func ExampleContext_Dur() { |
| 530 | d := 10 * time.Second |
| 531 | |
| 532 | log := zerolog.New(os.Stdout).With(). |
| 533 | Str("foo", "bar"). |
| 534 | Dur("dur", d). |
| 535 | Logger() |
| 536 | |
| 537 | log.Log().Msg("hello world") |
| 538 | |
| 539 | // Output: {"foo":"bar","dur":10000,"message":"hello world"} |
| 540 | } |
| 541 | |
| 542 | func ExampleContext_Durs() { |
| 543 | d := []time.Duration{ |