# zerolog

> Zero-allocation JSON logger for Go

Source: https://talira.ai/catalog/zerolog-ke5rs9xm
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / logging](https://talira.ai/categories/libraries/logging), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Olivier Poitrey](https://talira.ai/orgs/olivier-poitrey.md)

zerolog is a Go logging library dedicated to structured JSON output. Its chaining API writes JSON (or binary CBOR) log events while avoiding allocations and reflection, following the approach [zap](https://talira.ai/catalog/zap-yqmdrs48.md) pioneered with a simpler API. It offers leveled logging, sampling, hooks, contextual fields, context.Context and net/http integration, and a ConsoleWriter for readable output during development (slower, by its own account).

## Links

- GitHub: https://github.com/rs/zerolog
- Docs: https://pkg.go.dev/github.com/rs/zerolog

## Problems it solves

- fast structured JSON logging in my Go service without allocations
- add request context fields to every log line in a Go HTTP server
- sample high-volume debug logs in Go

## Features

- structured JSON logging with zero or low allocation
- CBOR binary encoding
- leveled logging
- log sampling
- hooks and contextual fields
- context.Context and net/http integration
- pretty console output for development

## Trust

Overall: 0.59 out of 1.
Signals: maintenance 0.65, adoption 0.82, momentum 0.62, community 0.90, backing 0.30, extensibility 0.00.

- last commit 19 days ago
- 7 commits in the last 90 days
- 12.5k GitHub stars
- 180 contributors
- backed by Olivier Poitrey

## Alternatives

- [zap](https://talira.ai/catalog/zap-yqmdrs48.md): Fast, structured, leveled logging for Go
- [Logrus](https://talira.ai/catalog/logrus-qb6bhbyk.md): Structured, pluggable logging for Go

## Sources

[^1]: https://github.com/rs/zerolog/blob/master/LICENSE (checked 27 Nov 2026)
