()
| 166 | } |
| 167 | |
| 168 | func ExampleLogger_Write() { |
| 169 | log := zerolog.New(os.Stdout).With(). |
| 170 | Str("foo", "bar"). |
| 171 | Logger() |
| 172 | |
| 173 | stdlog.SetFlags(0) |
| 174 | stdlog.SetOutput(log) |
| 175 | |
| 176 | stdlog.Print("hello world") |
| 177 | |
| 178 | // Output: {"foo":"bar","message":"hello world"} |
| 179 | } |
| 180 | |
| 181 | func ExampleLogger_Log() { |
| 182 | log := zerolog.New(os.Stdout) |