()
| 99 | } |
| 100 | |
| 101 | func ExampleStdlib() { |
| 102 | ctx := slog.With(context.Background(), slog.F("field", 1)) |
| 103 | l := slog.Stdlib(ctx, slog.Make(sloghuman.Sink(os.Stdout)), slog.LevelInfo) |
| 104 | |
| 105 | l.Print("msg") |
| 106 | |
| 107 | // 2019-12-07 20:54:23.986 [INFO] (stdlib) msg field=1 |
| 108 | } |
| 109 | |
| 110 | func ExampleLogger_Named() { |
| 111 | ctx := context.Background() |