()
| 190 | } |
| 191 | |
| 192 | func ExampleEvent_Dict() { |
| 193 | log := zerolog.New(os.Stdout) |
| 194 | |
| 195 | e := log.Log(). |
| 196 | Str("foo", "bar") |
| 197 | |
| 198 | e.Dict("dict", e.CreateDict(). |
| 199 | Str("bar", "baz"). |
| 200 | Int("n", 1), |
| 201 | ). |
| 202 | Msg("hello world") |
| 203 | |
| 204 | // Output: {"foo":"bar","dict":{"bar":"baz","n":1},"message":"hello world"} |
| 205 | } |
| 206 | |
| 207 | type User struct { |
| 208 | Name string |