What problem does it solve?
This Skill addresses the need for efficient, structured logging in Go applications, enabling developers to create zero-allocation JSON loggers, manage log levels, and integrate logging seamlessly into their projects.
Core Features & Use Cases
- Structured Logging: Generate logs in JSON format with zero allocations for common operations.
- Log Level Management: Configure and control the verbosity of logs (panic, fatal, error, warn, info, debug, trace).
- Contextual Logging: Integrate logging with
context.Context for better request tracing and management.
- Output Flexibility: Support for various output writers including console, files, and non-blocking diodes.
- Error Handling: Log errors with stack traces for easier debugging.
- HTTP Integration: Built-in support for logging HTTP requests using the
hlog package.
Quick Start
Use the zerolog skill to generate a basic Go program that logs "hello world" with a timestamp.