# rs/zerolog

Zero Allocation JSON Logger

Repository: https://github.com/rs/zerolog
Canonical: https://ross.abutalabs.com/products/zerolog
Language: Go
License: MIT
License Family: permissive
Topics: logging, json, golang, structured-logging, zerolog
Last push: 2026-08-24T15:12:00+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 3400, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12494, forks 633 (observed 2026-08-28T04:10:59.199781+00:00)

## What it is
Zerolog is a fast, zero-allocation JSON structured logging library for Go with a chained, context-aware API. It supports leveled logging, sampling, hooks, CBOR encoding, and integrations with net/http and log/slog.

## Use cases
- add structured JSON logging to a Go service
- log with minimal allocation overhead in hot paths
- attach contextual fields to log events
- integrate logging with net/http request handling
- migrate Go logging to log/slog with a fast backend
- pretty-print logs during local development

## When to choose
- you need high-performance structured logging in Go
- you want JSON or CBOR log output with low garbage collection pressure
- you need leveled, contextual, and sampled logging with a simple API

## When to avoid
- you need human-readable console logs as the primary format in production
- you need a logging backend outside the Go ecosystem
- you require extensive built-in log shipping or aggregation features

## Facets
- artifact type: library
- maturity: stable
- function: logging, serialization
- domain: developer-tools, backend, performance
- platform: go, cross-platform
- tags: structured-logging, -logging, zero-allocation, high-performance

## Member repositories
- rs/zerolog (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:59.199781+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:14:00.362170+00:00, confidence not recorded.
  - readme: https://github.com/rs/zerolog (fetched 2026-08-28T04:10:59.199781+00:00, sha 368a1060a22d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
