A JavaScript logging library built for Node.js that emits structured JSON with minimal runtime cost. Optional pretty printing and worker-thread transports handle formatting off the main thread.
Overview
Pino is a Node.js logging library oriented toward structured JSON output and low overhead. Log volume is treated as a performance concern because extra logging can reduce application throughput; the project publishes benchmark comparisons with other loggers.
You integrate it via npm or yarn and wire it into common Node web frameworks including Fastify, Express, Hapi, Restify, Koa, Nest, and Hono, as well as plain core HTTP usage. Child loggers, redaction rules, diagnostics hooks, and a documented browser API extend the same model beyond basic server logging.
Transports run log processing such as shipping, alerting, or reformatting in separate worker threads through the pino.transport API so the event loop stays responsive. Development workflows can pipe logs through pino-pretty for human-readable lines.
The codebase also documents bundling with webpack or esbuild. Alternate runtimes include Bare and Pear when paired with the pino-bare compatibility module.
Key features
- Structured JSON log lines
- Child loggers and redaction
- Worker-thread transports
- Framework integration guides
- Browser logging API
- Asynchronous logging options
- Bundling support
- Development pretty output
Use cases
- Production Node.js services
- Fast HTTP API logging
- Off-main-thread log shipping
- Structured observability pipelines