()
| 600 | } |
| 601 | |
| 602 | func ExampleContext_MACAddr() { |
| 603 | mac := net.HardwareAddr{0x00, 0x14, 0x22, 0x01, 0x23, 0x45} |
| 604 | log := zerolog.New(os.Stdout).With(). |
| 605 | MACAddr("hostMAC", mac). |
| 606 | Logger() |
| 607 | |
| 608 | log.Log().Msg("hello world") |
| 609 | |
| 610 | // Output: {"hostMAC":"00:14:22:01:23:45","message":"hello world"} |
| 611 | } |
| 612 | |
| 613 | func ExampleContext_Fields_map() { |
| 614 | fields := map[string]interface{}{ |