Navigate:
~$PINO0.1%

pino: JSON logger for Node.js applications

Low-overhead streaming JSON logger for Node.js.

LIVE RANKINGS • 06:52 AM • STEADY
OVERALL
#152
47
DEVELOPER TOOLS
#30
9
30 DAY RANKING TREND
ovr#152
·Devel#30
STARS
17.1K
FORKS
938
DOWNLOADS
14.3M
7D STARS
+15
7D FORKS
+1
See Repo:
Share:

Learn more about pino

Pino is a logging library for Node.js that produces JSON-formatted output by default. It uses a streaming architecture where logs are written directly to standard output, with optional transport workers handling log processing in separate threads to avoid blocking the main event loop. The library supports child loggers for contextual logging, log redaction for sensitive data, and integration with web frameworks like Express, Fastify, and Koa. Common deployment patterns include piping logs to external services, using pretty-printing during development, and running log processors as worker threads.

pino

1

Streaming JSON output

Logs are serialized to JSON and written directly to stdout, allowing logs to be piped to external processors or log aggregation services without requiring additional formatting layers.

2

Transport-based architecture

Log processing, filtering, and transmission are handled in separate worker threads via the transport API, preventing logging operations from blocking the main application thread.

3

Child logger context

Supports creating child loggers that automatically include parent context in all log entries, enabling request-scoped or component-scoped logging without manual context passing.


import pino from 'pino';

const logger = pino();

logger.info('Application started');
logger.error({ err: new Error('Failed') }, 'Request failed');
logger.debug({ userId: 123, action: 'login' }, 'User action');

vv10.1.0

Breaking change to censor function signature for safer types; redaction now handled by @pinojs/redact package.

  • Update censor function calls to match new safer type signature or expect TypeScript errors.
  • Verify redaction behavior as implementation now delegates to @pinojs/redact package.
vv9.14.0

Adds TypeScript LogFnFields type, updates redact dependency, and reverts a setLevel optimization.

  • Use the new LogFnFields TypeScript type for improved type safety when logging with additional fields.
  • Note that a setLevel optimization introduced earlier in v9.x has been reverted; performance characteristics may differ.
vv10.0.0

Drops Node.js 18 support; upgrade to Node.js 20+ required before adopting this release.

  • Upgrade runtime to Node.js 20 or later as Node.js 18 is no longer supported.
  • Adds LogFnFields type export for improved TypeScript logger function signatures.


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers