← ClaudeAtlas

golang-samber-sloglisted

Compose, route, sample, format, deliver, or test `log/slog` pipelines built with `github.com/samber/slog-*` modules. Use when a project already imports these extensions or deliberately selects one for multi-handler, middleware, HTTP, or backend behavior.
reagin/agent-skills · ★ 0 · API & Backend · score 63
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