What problem does it solve?
This Skill solves inconsistent, hard-to-debug logging practices by enforcing a single structured logging policy for Go services so logs carry the right module identity and correct context-aware logger usage.
Core Features & Use Cases
- Canonical logging ownership: Defines how to place and configure
*slog.Logger fields, including consistent module naming.
- Context-aware handler logging: Ensures HTTP/gRPC handlers use
logger.FromContext(ctx) so request fields are preserved.
- Safe, consistent log semantics: Standardizes log levels, English messages, snake_case keys, and error attribute naming using
err.
Quick Start
When adding logging to a service, adapter, repository, client, resolver, or handler, apply the x-log policy: store a *slog.Logger with a correctly named module in the component and use logger.FromContext(ctx) inside handlers.