()
| 672 | } |
| 673 | |
| 674 | func ExampleContext_StringersV() { |
| 675 | // net.IP values implement fmt.Stringer and can be used with StringersV |
| 676 | a := net.IPv4bcast |
| 677 | b := net.IPv4allrouter |
| 678 | |
| 679 | log := zerolog.New(os.Stdout).With(). |
| 680 | StringersV("ips", a, b). |
| 681 | Logger() |
| 682 | |
| 683 | log.Log().Msg("hello world") |
| 684 | |
| 685 | // Output: {"ips":["255.255.255.255","224.0.0.2"],"message":"hello world"} |
| 686 | } |