zerolog

Generate, explain, and debug zerolog structured logging code for Go applications.

2|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/rigerc/bubbletea-v2-scaffold --skill zerolog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zerolog
Source: https://github.com/rigerc/bubbletea-v2-scaffold/tree/main/.claude/skills/zerolog
Command: npx skills add https://github.com/rigerc/bubbletea-v2-scaffold --skill zerolog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about zerolog

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

FAQPage Schema
How do I implement zero-allocation structured logging in Go?

Zero-allocation structured logging in Go is achieved by using zerolog to generate JSON logs without allocating memory for common operations, which optimizes performance for critical services. This Skill generates the necessary Go code to implement this efficiently.

What is the best way to configure log levels for a Go application?

The best way to configure log levels in Go is by setting the verbosity from panic to trace using zerolog. This Skill explains how to generate code that controls log levels to manage application output effectively across different environments.

How does context-based logging work with Go context.Context?

Context-based logging works by integrating zerolog with Go's context.Context to attach structured fields and trace requests. This Skill generates code to pass loggers through contexts, ensuring better request tracing and management.

Can I use structured logging for HTTP request integration in Go?

Yes, you can use structured logging for HTTP requests by integrating zerolog's built-in hlog package. This Skill provides code examples to seamlessly log HTTP requests, enabling robust monitoring for Go web services.

Does zerolog support non-blocking output writers for high-performance Go services?

Yes, zerolog supports non-blocking output writers, including diodes, for high-performance Go services. This Skill demonstrates how to configure various output destinations like consoles and files while maintaining zero-allocation logging.