uber-go/zap

Blazing fast, structured, leveled logging in Go.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 7 minutes ago
Added to GitGenius on September 2nd, 2026
Created on February 18th, 2016
Open Issues & Pull Requests: 187 (+0)
GitHub issues: Enabled
Number of forks: 1,551
Total Stargazers: 24,648 (+1)
Total Subscribers: 247 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Zap is a structured logging library for Go that prioritizes performance and type safety.

The library addresses the overhead of reflection-based serialization and string formatting in logging hot paths by using a reflection-free, zero-allocation JSON encoder. It offers two APIs: the SugaredLogger provides a familiar, loosely typed interface with printf-style support, while the base Logger enforces structured logging with stricter typing and lower allocation overhead. Users can choose the appropriate API based on whether their use case demands maximum performance or prefers ergonomics.

Zap suits applications where logging occurs frequently in performance-critical code paths. The SugaredLogger works well for general-purpose logging where convenience matters more than squeezing every nanosecond, while the base Logger is the right choice for systems that log extensively in tight loops or latency-sensitive operations. The README positions zap as faster than comparable structured logging packages and faster than the standard library, though it acknowledges that benchmarks should be interpreted cautiously.

The project maintains a stable development status. The tool restricts support to the two most recent minor versions of Go, ensuring compatibility with current language features without maintaining legacy version support.