golang-samber-sloglisted
Install: claude install-skill reagin/agent-skills
# samber slog extensions
Inspect `go.mod`, every `github.com/samber/slog-*` import, local handler wrappers, and the full record path from logger to sink. These extensions are separate modules with independent major versions and lifecycle APIs; verify each selected module rather than applying one shared version assumption.
## Select the module by responsibility
| Module | Responsibility | Representative surface |
| --- | --- | --- |
| `github.com/samber/slog-multi` | Handler composition | `Fanout`, `Router`, `FirstMatch`, `Failover`, `Pool`, `Pipe` |
| `github.com/samber/slog-sampling` | Record admission | uniform, threshold, absolute, or custom sampling options |
| `github.com/samber/slog-formatter` | Attribute transformation | formatter middleware and key/type/group formatters |
| `github.com/samber/slog-gin`, `slog-echo`, `slog-fiber`, `slog-chi`, `slog-http` | HTTP logging | framework middleware, filters, request attributes |
| `github.com/samber/slog-datadog`, `slog-sentry`, `slog-loki`, and other selected adapters | Remote, queue, storage, or logger bridge | backend-specific option and handler constructors |
Major-version suffixes and constructor names vary by module. Read the exact `go.mod` requirement and package docs before writing an import or shutdown call.
## Preserve `slog.Handler` behavior
Trace `Enabled`, `Handle`, `WithAttrs`, and `WithGroup` through every wrapper. Preformatted attributes and group state must survive composition. Confirm whether handlers