golang-samber-slog

Implements structured logging in Go with sampling, formatting, middleware, and routing.

Updated May 4, 2026
One-click install
npx skills add https://github.com/VIethoangnguyenle/nexus-enterprise --skill golang-samber-slog-viethoangnguyenle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-slog
Source: https://github.com/VIethoangnguyenle/nexus-enterprise/tree/main/.agent/skills/golang-samber-slog
Command: npx skills add https://github.com/VIethoangnguyenle/nexus-enterprise --skill golang-samber-slog-viethoangnguyenle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It addresses the need for advanced, flexible, and efficient structured logging for Go projects, simplifying traceability and log management.

Core Features & Use Cases

  • Extends Go logging with multiple handler pipelines, sampling, and attribute formatting capabilities.
  • Supports HTTP middleware integration, enabling request-aware logging with filtering and context propagation.
  • Ideal for developing maintainable logging strategies for resilience, observability, and troubleshooting in production environments.

Quick Start

Configure a logger with sampling, PII scrubbing, and error routing, then use it across services to improve log clarity and performance.

Frequently Asked Questions about golang-samber-slog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement structured logging in Go applications for production observability?

Structured logging in Go applications is implemented through multiple handler pipelines, attribute formatting, and backend routing to improve observability and debug capabilities in production systems.

What is the best way to add HTTP middleware for request-aware logging in Go?

Adding HTTP middleware for request-aware logging in Go involves integrating filtering and context propagation to capture request-specific data and improve application traceability.

How does log sampling work to improve performance in Go applications?

Log sampling in Go applications works by reducing the volume of log entries processed, which optimizes performance while maintaining sufficient observability for troubleshooting production systems.

Can I route Go application logs to different backends based on error severity?

Yes, you can route Go application logs to different backends by configuring multiple handler pipelines, allowing specific error routing to streamline log management and troubleshooting.

Does this Go logging system support PII scrubbing and attribute formatting?

Yes, the Go logging system supports attribute formatting and PII scrubbing to configure log clarity, ensuring sensitive data is filtered before logs are routed to backends.