Skip to content
Pino
Pino v10.4.0 · Node.js, Bare and Pear

Very low overhead Node.js logger.

One JSON line per log call, nothing more. Pino keeps logging out of your hot path and moves the expensive work — shipping, formatting, alerting — into a separate worker.

Read the docs
$npm install pino
downloads / mo
0
github stars
0
license
MIT
const logger = require('pino')()

logger.info('hello world')

const child = logger.child({ a: 'property' })
child.info('hello child!')

Pipe it through pino-pretty in development for a readable stream.

// essentials

Built for production, pleasant in development

Log messages tend to accumulate over the life of an application. Pino is designed so that adding more of them never becomes the bottleneck.

5x faster

Low overhead

Logging should not throttle your app. Pino does the minimum amount of work per line and in many cases is over 5x faster than the alternatives.

ndjson

Newline-delimited JSON

Every line is a JSON object with level, time, pid, hostname and your message, so any tool can parse it without a custom format.

logger.child()

Child loggers

Bind request ids, user ids or module names once and every line from that child carries them.

pino.transport

Transports in a worker

Ship, reformat or alert on logs from a worker thread, so processing never blocks the event loop.

fast-redact

Redaction

Strip or mask sensitive paths like headers.authorization before they ever reach a destination.

pino-pretty

Pretty printing

Keep JSON in production and pipe through pino-pretty in development for a colourised, human-readable stream.

// development formatting

JSON in production, colour on your terminal

Pipe the output throughpino-prettywhile you work. Nothing changes in your code, and production keeps the machine-readable stream.

Pino with your web framework

Terminal showing pino-pretty output with coloured levels, timestamps and messages

// the team

Meet the maintainers

// acknowledgements

The project is kindly sponsored by

Log more, slow down less

Start from the introduction, compare the numbers on the benchmarks page, or browse the examples in the repo.