Skip to content

Commit 0d5ce8f

Browse files
committed
Update readme with notes on slog-multi middleware
1 parent d27cf58 commit 0d5ce8f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -405,3 +405,14 @@ func newTraceProvider(exp sdktrace.SpanExporter) *sdktrace.TracerProvider {
405405
)
406406
}
407407
```
408+
409+
### slog-multi Middleware
410+
This library has a convenience method that allow it to interoperate with [github.com/samber/slog-multi](https://github.com/samber/slog-multi),
411+
in order to easily setup slog workflows such as pipelines, fanout, routing, failover, etc.
412+
```go
413+
slog.SetDefault(slog.New(slogmulti.
414+
Pipe(slogcontext.NewMiddleware(&slogcontext.HandlerOptions{})).
415+
Pipe(slogdedup.NewOverwriteMiddleware(&slogdedup.OverwriteHandlerOptions{})).
416+
Handler(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{})),
417+
))
418+
```

0 commit comments

Comments
 (0)