API Reference

Pino

Very low overhead Node.js logger with JSON output, async writes, and child loggers.

Official Documentation ↗
CompatibilityThis documentation covers version v9.5. Check the official docs for the latest API surface.

Installation

npmnpm install pino
pnpmpnpm add pino
yarnyarn add pino

Methods

Pino is a very low overhead Node.js logger. It outputs newline-delimited JSON by default, supports child loggers, redaction, and worker-thread transports for non-blocking formatting.

Key Features

  • Fast: Minimal overhead, synchronous JSON writes
  • Child loggers: Cheap request-scoped context binding
  • Redaction: Hide sensitive fields by path
  • Transports: Worker-thread formatting and custom targets
  • Async: Non-blocking logging for high-throughput services

API reference evidence

Fetched from official sources on 2026-11-08T19:26:00+08:00 via WebFetch https://raw.githubusercontent.com/pinojs/pino/main/docs/api.md(返回空);WebFetch https://cdn.jsdelivr.net/gh/pinojs/pino@latest/docs/api.md;WebFetch https://cdn.jsdelivr.net/npm/[email protected]/pino.d.ts.

FAQ

Why is Pino faster than Winston?
Pino writes JSON synchronously to a stream with minimal allocation and defers formatting to a worker thread via transports. This keeps the main thread unblocked, yielding 3-5x higher throughput than Winston.
How do I pretty-print Pino logs in development?
Pipe output to pino-pretty, or set a transport with target: 'pino-pretty' in development. Avoid pretty-printing in production since it adds overhead and loses machine-readability.
What is a child logger in Pino?
A child logger pre-binds bindings like requestId that appear in every log line. Creating children is cheap and is the recommended way to add request-scoped context without per-call overhead.