์Šคํ‚ฌ golang-samber-slog
๐Ÿ“ฆ

golang-samber-slog

v1.1.2 ์ฝ˜ํ…์ธ  ๋ฆฌ๋น„์ „ r1 ์ค‘๊ฐ„ ์œ„ํ—˜ โš™๏ธ ์™ธ๋ถ€ ๋ช…๋ น์–ด๐ŸŒ ๋„คํŠธ์›Œํฌ ์ ‘๊ทผโšก ์Šคํฌ๋ฆฝํŠธ ํฌํ•จ

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.

์ง€์›: Codex Code(CC)
Maintain this Skill? Claim it ๐Ÿ“Š 70 ์ ์ ˆํ•จ

๋‚ด ์—์ด์ „ํŠธ๋กœ ์„ค์น˜

์ด ์š”์ฒญ์„ ์—์ด์ „ํŠธ์— ๋ณต์‚ฌํ•˜์„ธ์š”. ๊ณต์‹ Skill ํŽ˜์ด์ง€์™€ ๋งค๋‹ˆํŽ˜์ŠคํŠธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

์—์ด์ „ํŠธ ์š”์ฒญ
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.

์—์ด์ „ํŠธ๋Š” ๊ณ„์†ํ•ด์„œ ๊ณ„ํš์„ ํ‘œ์‹œํ•˜๊ณ  ๋ณด์•ˆ ์ •์ฑ…์—์„œ ์š”๊ตฌํ•˜๋Š” ํ™•์ธ์„ ์š”์ฒญํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์—์ด์ „ํŠธ๊ฐ€ ์ฝ๊ธฐ ์‰ฌ์šด ๋ฆฌ์†Œ์Šค

AI ์—์ด์ „ํŠธ, ํฌ๋กค๋Ÿฌ, ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์ „์ฒด ํŽ˜์ด์ง€ ๋Œ€์‹  ์ •๋ฆฌ๋œ ์ปจํ…์ŠคํŠธ๋งŒ ํ•„์š”ํ•  ๋•Œ ์ด ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.

ํ…Œ์ŠคํŠธํ•ด ๋ณด๊ธฐ

"golang-samber-slog" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. Why do error records reach both PagerDuty and Slack in my Router?

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

The default Router sends each record to every matching handler. Use FirstMatch and order the error rule before the warning rule.

"golang-samber-slog" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. Where should sampling and PII formatting appear in my pipeline?

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

Place sampling first, then apply PII formatting, then route clean records to sinks. Preserve important records with level-aware routing.

"golang-samber-slog" ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค. Why are buffered Loki records missing during shutdown?

์˜ˆ์ƒ ๊ฒฐ๊ณผ:

The Loki client must stop during graceful shutdown. Register its stop operation and allow enough time to flush pending records.

๋ณด์•ˆ ๊ฐ์‚ฌ

์ค‘๊ฐ„ ์œ„ํ—˜

All 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.

6
์Šค์บ”๋œ ํŒŒ์ผ
1,341
๋ถ„์„๋œ ์ค„ ์ˆ˜
0
๊ฒ€ํ†  ํ•ญ๋ชฉ
0
์˜คํƒ ๋ฌด์‹œ๋จ

ํ™•์ธ๋œ ๋ณด์•ˆ ์šฐ๋ ค ์‚ฌํ•ญ (1)

์ค‘๊ฐ„
Request bodies may expose sensitive data
Examples enable request-body logging without warning that bodies may contain credentials, tokens, or personal data sent to configured log sinks.
Five examples explicitly set WithRequestBody to true, while the surrounding guidance provides no warning or body-redaction requirement.
๊ฐ์‚ฌ์ž: codex
์ด ๋ณด๊ณ ์„œ ๊ณต์œ  ๋ฐ ์ธ์šฉ

๋ฒ„์ „์ด ์ง€์ •๋œ ํ‰๊ฐ€ ๋ณด๊ณ ์„œ, ์ค‘๋ฆฝ ๋ฐฐ์ง€, ์ž„๋ฒ ๋“œ ์นด๋“œ ๋ฐ ์ธ์šฉ์„ ๊ณต์œ ํ•˜์„ธ์š”. Skillstore๋Š” ๊ทผ๊ฑฐ๋ฅผ ๋ณด๊ณ ํ•˜์ง€๋งŒ ์ด Skill์˜ ์•ˆ์ „ ์—ฌ๋ถ€๋ฅผ ํŒ๋‹จํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋ฒ„์ „๋ณ„ ๋ณด๊ณ ์„œ ์—ด๊ธฐ
๋ณด์•ˆ ํ‰๊ฐ€

๋ณด๊ณ ์„œ ๋งํฌ ๋ณต์‚ฌ

https://skillstore.io/skills/samber-golang-samber-slog/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown ๋ฐฐ์ง€

[![Skillstore security assessment](https://skillstore.io/badges/skills/samber-golang-samber-slog/security.svg)](https://skillstore.io/skills/samber-golang-samber-slog?utm_source=security_passport_badge)

HTML ๋ฐฐ์ง€

<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>

์ž„๋ฒ ๋“œ ์นด๋“œ

<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>
ํ•™์ˆ  ์ธ์šฉ (APA ยท BibTeX ยท CFF)

APA ์ธ์šฉ

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/1

BibTeX ์ธ์šฉ

@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 ์ ์ˆ˜

์ด ์ ์ˆ˜์˜ ์ด์œ  ์ฆ๊ฑฐ ์‹ ๋ขฐ๋„: ์ค‘๊ฐ„
45
์•„ํ‚คํ…์ฒ˜
100
์œ ์ง€๋ณด์ˆ˜์„ฑ
87
์ฝ˜ํ…์ธ 
65
์ปค๋ฎค๋‹ˆํ‹ฐ
91
์‚ฌ์–‘ ์ค€์ˆ˜

๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ๊ฒƒ

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.

์ด ํ”„๋กฌํ”„ํŠธ๋ฅผ ์‚ฌ์šฉํ•ด ๋ณด์„ธ์š”

Create a basic pipeline
Create a Go slog pipeline using samber/slog-multi. Send error records to Sentry and all records to standard output.
Add sampling and privacy controls
Add threshold sampling and PII formatting to my existing slog pipeline. Explain the handler order and preserve all error records.
Configure HTTP middleware
Configure slog middleware for Gin with distinct 4xx and 5xx levels, request IDs, tracing fields, and health-check filters. Keep body logging disabled.
Review a production architecture
Review my samber/slog pipeline for duplicate routing, latency, data exposure, fallback behavior, and shutdown loss. Propose tested changes with tradeoffs.

๋ชจ๋ฒ” ์‚ฌ๋ก€

  • 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.

ํ”ผํ•˜๊ธฐ

  • 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.

์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

Which Go versions does this skill target?
It targets Go 1.21 and later because the packages build on the standard log/slog API.
Can it configure multiple logging destinations?
Yes. It explains routing, fanout, failover, and pooling across supported samber handlers.
Does it prevent sensitive data from entering logs?
It provides formatter patterns for selected attributes. Applications must still identify sensitive fields and avoid unsafe body logging.
Does it install Go packages automatically?
No. It can recommend imports and versions, but dependency changes remain part of the project workflow.
Can it validate a production pipeline?
It can review composition and propose tests. Runtime load, backend availability, and package behavior still require direct testing.
Why must buffered handlers stop cleanly?
Buffered handlers may retain unsent records. Their stop or close operation flushes pending data before the process exits.

๊ฐœ๋ฐœ์ž ์„ธ๋ถ€ ์ •๋ณด

์ž‘์„ฑ์ž

samber

๋ผ์ด์„ ์Šค

MIT

์ž‘์„ฑ์ž ๋ฒ„์ „

v1.1.2

Skillstore ๋ฆฌ๋น„์ „

r1

์ฐธ์กฐ

e5464e662405de6361fdde6b984f9ea865635f64

์œ ์ง€๋ณด์ˆ˜ ์ตœ์‹ ์„ฑ

2026. 9. 8.

์‚ฌ์šฉ๋Ÿ‰

1 ๋‹ค์šด๋กœ๋“œ ยท 0 ์กฐํšŒ

ํŒŒ์ผ ๊ตฌ์กฐ

๐Ÿ“ evals/

๐Ÿ“„ evals.json

๐Ÿ“ references/

๐Ÿ“„ backend-handlers.md

๐Ÿ“„ http-middlewares.md

๐Ÿ“„ pipeline-patterns.md

๐Ÿ“„ sampling-strategies.md

๐Ÿ“„ SKILL.md