()
| 556 | } |
| 557 | |
| 558 | func ExampleContext_IPAddr() { |
| 559 | hostIP := net.IP{192, 168, 0, 100} |
| 560 | log := zerolog.New(os.Stdout).With(). |
| 561 | IPAddr("HostIP", hostIP). |
| 562 | Logger() |
| 563 | |
| 564 | log.Log().Msg("hello world") |
| 565 | |
| 566 | // Output: {"HostIP":"192.168.0.100","message":"hello world"} |
| 567 | } |
| 568 | |
| 569 | func ExampleContext_IPAddrs() { |
| 570 | hostIP := net.IP{192, 168, 0, 100} |