pino: JSON logger for Node.js applications
Low-overhead streaming JSON logger for Node.js.
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.

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.
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.
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');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.
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.
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.
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
spdlog
Fast C++ logging with flexible sinks and fmt formatting.
fastfetch
High-performance CLI system information display written in C.
node-gyp
Compiles native C/C++ addons for Node.js.
bun
Fast JavaScript runtime with built-in bundler and package manager.
open-directory
Command-line search engine for indexed open directories.