()
| 21 | } |
| 22 | |
| 23 | func Example_marshaller() { |
| 24 | l := slog.Make(sloghuman.Sink(os.Stdout)) |
| 25 | |
| 26 | l.Info(context.Background(), "wow", |
| 27 | slog.F("myStruct", myStruct{ |
| 28 | foo: 1, |
| 29 | bar: 2, |
| 30 | }), |
| 31 | ) |
| 32 | |
| 33 | // 2019-12-16 17:31:37.120 [INFO] <example_marshaller_test.go:26> wow {"myStruct": {"foo": 1, "bar": 1}} |
| 34 | } |