golang-samber-slog
Build Go Logging Pipelines with samber/slog
Complex Go logging pipelines can duplicate records, lose buffered events, or expose sensitive data. This skill guides composition, sampling, formatting, middleware, routing, and shutdown.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "golang-samber-slog" from https://skillstore.io/skills/samber-golang-samber-slog.md and its manifest at https://skillstore.io/api/skills/samber-golang-samber-slog/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "golang-samber-slog". Why do error records reach both PagerDuty and Slack in my Router?
Expected outcome:
The default Router sends each record to every matching handler. Use FirstMatch and order the error rule before the warning rule.
Using "golang-samber-slog". Where should sampling and PII formatting appear in my pipeline?
Expected outcome:
Place sampling first, then apply PII formatting, then route clean records to sinks. Preserve important records with level-aware routing.
Using "golang-samber-slog". Why are buffered Loki records missing during shutdown?
Expected outcome:
The Loki client must stop during graceful shutdown. Register its stop operation and allow enough time to flush pending records.
Security Audit
Medium RiskAll 69 static alerts are false positives caused by Markdown, Go syntax, placeholders, documentation links, or benign logging terminology. One medium contextual risk remains because examples enable request-body logging without sensitive-data guidance.
Confirmed security concerns (1)
Risk Factors
โ๏ธ External commands (50)
๐ Network access (8)
โก Contains scripts (1)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/samber-golang-samber-slog/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/samber-golang-samber-slog?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/samber-golang-samber-slog?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-samber-slog/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/samber-golang-samber-slog.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
samber. (2026). golang-samber-slog security audit report (audit version 1) [Author version 1.1.2]. Skillstore. https://skillstore.io/skills/samber-golang-samber-slog/audits/1BibTeX citation
@techreport{samber-samber-golang-samber-slog-2026,
author = {samber},
title = {golang-samber-slog security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-samber-slog/audits/1},
note = {Author version 1.1.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-samber-slog security audit report (audit version 1)"
version: "1.1.2"
type: report
authors:
- name: "samber"
date-released: "2026-09-06"
url: "https://skillstore.io/skills/samber-golang-samber-slog/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-samber-slog:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Compose a service logging pipeline
Create a pipeline that samples noise, masks sensitive attributes, and routes records by level.
Standardize HTTP request logs
Configure framework middleware with consistent levels, request identifiers, tracing fields, and filters.
Diagnose production logging behavior
Find dropped records, duplicate routing, latency bottlenecks, and missing shutdown flushes.
Try These Prompts
Create a Go slog pipeline using samber/slog-multi. Send error records to Sentry and all records to standard output.
Add threshold sampling and PII formatting to my existing slog pipeline. Explain the handler order and preserve all error records.
Configure slog middleware for Gin with distinct 4xx and 5xx levels, request IDs, tracing fields, and health-check filters. Keep body logging disabled.
Review my samber/slog pipeline for duplicate routing, latency, data exposure, fallback behavior, and shutdown loss. Propose tested changes with tradeoffs.
Best Practices
- Sample early, format sensitive attributes before routing, and define a catch-all route.
- Benchmark handler latency and test routing with in-memory handlers before deployment.
- Flush buffered backends during graceful shutdown and verify failures are observable.
Avoid
- Do not enable request or response body logging without redaction and route exclusions.
- Do not assume Router stops after the first matching handler.
- Do not use synchronous Fanout when cumulative sink latency is unacceptable.
Frequently Asked Questions
Which Go versions does this skill target?
Can it configure multiple logging destinations?
Does it prevent sensitive data from entering logs?
Does it install Go packages automatically?
Can it validate a production pipeline?
Why must buffered handlers stop cleanly?
Developer Details
Author
samberLicense
MIT
Author version
v1.1.2
Skillstore revision
r1
Ref
e5464e662405de6361fdde6b984f9ea865635f64
Maintenance freshness
9/8/2026
Usage
0 downloads ยท 0 views
File structure
๐ evals/
๐ evals.json
๐ references/
๐ backend-handlers.md
๐ http-middlewares.md
๐ pipeline-patterns.md
๐ SKILL.md