()
| 498 | } |
| 499 | |
| 500 | func ExampleContext_EmbedObject() { |
| 501 | price := Price{val: 6449, prec: 2, unit: "$"} |
| 502 | |
| 503 | log := zerolog.New(os.Stdout).With(). |
| 504 | Str("foo", "bar"). |
| 505 | EmbedObject(price). |
| 506 | Logger() |
| 507 | |
| 508 | log.Log().Msg("hello world") |
| 509 | // Output: {"foo":"bar","price":"$64.49","message":"hello world"} |
| 510 | } |
| 511 | |
| 512 | func ExampleContext_Interface() { |
| 513 | obj := struct { |