()
| 61 | } |
| 62 | |
| 63 | func ExampleNewConsoleWriter() { |
| 64 | out := zerolog.NewConsoleWriter() |
| 65 | out.NoColor = true // For testing purposes only |
| 66 | log := zerolog.New(out) |
| 67 | |
| 68 | log.Debug().Str("foo", "bar").Msg("Hello World") |
| 69 | // Output: <nil> DBG Hello World foo=bar |
| 70 | } |
| 71 | |
| 72 | func ExampleNewConsoleWriter_customFormatters() { |
| 73 | out := zerolog.NewConsoleWriter( |
nothing calls this directly
no test coverage detected