Observabilityintermediate

Pino vs Winston

Pino vs Winston compared for 2026: Pino 10.4 (JSON-first, worker-thread transports, built-in redaction) vs Winston 3.19 (formats and multiple transports in-process). Includes throughput, memory, what survives process.exit(), error serialization and disabled-level cost from runs we did on the same machine, plus a clear pick.

Quick Answer

Pino and Winston are the two Node.js loggers most teams choose between. Pino 10.4.0 (2 October 2026) writes newline-delimited JSON with a fixed set of fields, moves transports such as file shipping or pretty-printing into a worker thread, and has redaction and an error serializer built in. Winston 3.19.0 (7 December 2025, no release since) gives you composable formats, custom levels and several transports running in the main process, with community transports for most destinations. In our runs on Node 22.23.5, writing 200,000 structured lines to a file took 338-388 ms with Pino's synchronous destination and 1,124-1,332 ms with Winston's File transport, and Winston's Console transport used about 390 MB of memory against about 70 MB. The bigger differences were correctness ones: with the defaults, Winston's json format logged a bare Error as {"code":"ETIMEDOUT","level":"error"} with no message or stack, and a process.exit() right after logging kept 1 of 50,000 lines with the File transport, while Pino's stdout and transport paths kept all 50,000. Pick Pino for services, especially if you ship JSON to a log pipeline. Pick Winston when you need several in-process outputs with different formats and are willing to configure errors and shutdown carefully.

Last updated November 27, 2026. Covers Pino 10.4.0 (2 October 2026) and Winston 3.19.0 (7 December 2025); package metadata, docs, release notes and repository data read on 27 November 2026, plus same-machine throughput, memory, exit, error-serialization, redaction and disabled-level runs we did that day.

Feature comparison of Pino vs Winston
FeaturePinoWinston
Licence & Repository
MIT; pinojs/pino, ~18.3k stars
MIT; winstonjs/winston, ~24.5k stars
Latest Release (Nov 2026)
10.4.0 on 2 Oct 2026 (10.1.1 to 10.4.0 shipped in 2026)
3.19.0 on 7 Dec 2025 (no 2026 releases)
Dependencies & Install Size
11 direct deps; 13 packages, ~2.7 MB node_modules in our install
11 direct deps; 29 packages, ~3.4 MB node_modules in our install
Default Output Format
One JSON line: level (number), time, pid, hostname, fields, msg
Depends on format; json() gives level (string), message, meta
Default Levels
fatal 60, error 50, warn 40, info 30, debug 20, trace 10
npm: error 0, warn 1, info 2, http 3, verbose 4, debug 5, silly 6
Transports / Destinations
pino.destination (file/fd), pino.transport targets (pino/file, pino-pretty, community), multistream
Core Console, File, Http, Stream; community transports
Where Transports Run
Destinations in the main thread; transports in a worker thread
All transports in the main process
Formatting / Pretty-printing
formatters/serializers options; pretty output via pino-pretty 13.2.0
logform pipeline: timestamp, json, printf, colorize, errors, splat
Logging an Error Object
err key serialized: type, message + cause, stack, extra props
Needs format.errors({ stack: true }); bare json() drops message and stack
Redaction of Secrets
Built in: redact paths with wildcards, custom censor or remove
None built in; write a custom format
Child Loggers / Bindings
logger.child(bindings, options) with per-child redact and level
logger.child(meta)
Flushing on Exit
Async destinations flushed on exit via on-exit-leak-free; transports flushed
Call logger.end() and wait for finish; process.exit() loses buffered lines
Uncaught Exceptions / Rejections
No handler of its own; log in process.on('uncaughtException') yourself
handleExceptions / handleRejections, exitOnError (default true)
TypeScript Types
Bundled (pino.d.ts)
Bundled (index.d.ts)
Framework Integrations
Fastify built-in logger, pino-http, pino-roll, many transports
8/10
Community transports, winston-daily-rotate-file, many framework adapters
9/10
Release Activity (2026)
Five releases in 2026; repo pushed 26 Nov 2026
Last release Dec 2025; repo pushed Jul 2026
Our Run: 200k lines to a file (1 core)
338-388 ms sync destination; 439-518 ms via transport
1,124-1,332 ms File transport (timestamp + json)
Our Run: 200k lines to stdout (redirected)
466-522 ms, all 200,000 lines
1,239-1,464 ms Console, ~390 MB RSS
Our Run: 50k lines then process.exit(0)
50,000 of 50,000 (stdout file, pipe and transport)
File 0-1 of 50,000; Console piped 6,110-13,449
Our Run: 10M disabled debug() calls
40-50 ms
6.8-7.0 s

Pino

Pino is a JSON logger for Node.js built around low overhead in the application thread. Each call writes one line of newline-delimited JSON with numeric levels (fatal 60 down to trace 10), a millisecond timestamp, pid and hostname, plus whatever object you pass. Writing goes through sonic-boom destinations, which can be synchronous or buffered, or through transports that run in a worker thread so formatting, file rotation or shipping to a log service happen off the main thread. Redaction of paths such as req.headers.authorization, child loggers with bindings, and a standard error serializer are built in, and TypeScript types ship with the package. Pretty output for development comes from the separate pino-pretty package. Pino is the logger used by Fastify (fastify 5.12.8 depends on pino ^9.14.0 || ^10.1.0) and has pino-http for Express-style servers. Pino 10.4.0 was released on 2 October 2026, is MIT-licensed and has about 18.3k GitHub stars.

Pros

  • Fastest file writes in our run: 200,000 structured lines in 338-388 ms with a synchronous destination, about 3x quicker than Winston's File transport
  • Low memory: about 70 MB RSS for the same run, against 124-131 MB for Winston File and about 390 MB for Winston Console
  • Errors are serialized properly by default: log.error(err) produced type, message (with the cause appended), full stack and code
  • Built-in redaction by path, including wildcards such as *.token, with no extra package
  • Transports run in a worker thread; with two cores the main-thread logging loop dropped to 249-274 ms for 200,000 lines
  • Disabled levels are close to free: 10 million debug() calls at level info took 40-50 ms

Cons

  • JSON only out of the box: human-readable output needs pino-pretty, which the docs say logger.flush() cannot fully flush
  • An asynchronous pino.destination(path) crashed with 'sonic boom is not ready yet' and wrote nothing when process.exit() ran before the file had opened
  • Fixed output shape (numeric level, msg, time) means some log platforms need a formatter or mapping to read levels as text
  • Transports add a worker thread: about 144 MB RSS in our run against about 70 MB for a direct destination
  • Error serialization only applies to the err key by default: log.error({ error: err }) kept just the code and lost message and stack

Best For

HTTP services and workers that log JSON to stdout or a file for a log pipeline (Loki, Elasticsearch, Datadog, CloudWatch), especially Fastify apps and anything where logging sits on a hot path.

Winston

Winston is the long-standing general-purpose logger for Node.js. A logger is a Node.js stream with one or more transports (Console, File, Http and Stream in core, plus community transports for services and rotating files) and a format pipeline built from logform pieces such as timestamp(), json(), printf(), colorize() and errors(). Levels follow the npm scheme by default (error 0 through silly 6) and can be replaced with syslog or custom levels, and each transport can have its own level and format. Winston also includes exception and rejection handlers with an exitOnError setting, profiling with startTimer(), and a query API for some transports. Everything runs in the main process. Winston 3.19.0 was released on 7 December 2025, is MIT-licensed, supports Node 12 and newer, ships TypeScript types, and has about 24.5k GitHub stars and roughly 556 open issues and pull requests.

Pros

  • Flexible output: each transport can have its own level and format, so plain coloured text to the console and JSON to a file is a few lines of config
  • Custom levels and the syslog level set are built in
  • Exception and rejection handlers, profiling and a query API come with the core package
  • Large ecosystem of community transports, including winston-daily-rotate-file 5.0.0 for rotating files
  • logger.end() plus the finish event did flush all 50,000 lines to the file in our test

Cons

  • With the default json format, log.error(err) produced only {"code":"ETIMEDOUT","level":"error"}: no message, no stack. You need format.errors({ stack: true })
  • process.exit() straight after logging kept 1 of 50,000 lines with the File transport, and 6,110-13,449 of 50,000 with Console piped to another process
  • Slower and heavier in our runs: 1,124-1,332 ms and about 125-130 MB for 200,000 lines to a file; Console used about 390 MB
  • Disabled levels still cost work: 10 million debug() calls at level info took 6.8-7.0 s, about 0.7 µs each
  • No release since 3.19.0 in December 2025, and around 556 open issues and pull requests

Best For

Applications that need several in-process outputs with different formats and levels (console text plus JSON files plus an HTTP sink), custom level schemes, or existing Winston transports, where logging volume is moderate.

Two designs: a fast JSON writer versus a format-and-transport pipeline

Pino's design goal is to do as little as possible in the thread that serves requests. A call such as log.info({ reqId, status }, 'request completed') builds one JSON string with precomputed chunks for the level, time, pid, hostname and any child bindings, and hands it to a destination. pino.destination() is a sonic-boom stream that writes to a file descriptor, either synchronously or in buffered chunks (the docs show minLength: 4096 with sync: false). Anything heavier, such as pretty-printing, writing to several files, rotating or shipping to a service, is a transport: pino.transport() starts a worker thread and the main thread passes it already-serialized lines, so the work happens elsewhere. Winston's design goal is flexibility. A logger is a Node.js stream; each entry is an info object that flows through a format pipeline made of small logform functions (timestamp, json, printf, colorize, errors, splat), and then to each transport, which can have its own level and format. That is why Winston can send coloured text to the console, JSON to a file and errors to an HTTP endpoint from one logger with little code, and why every one of those steps runs in your main process. The two also disagree on call shape: Pino takes log.info(object, message) and Winston takes log.info(message, meta), which matters when you migrate.

What we measured: throughput and memory

On 27 November 2026 we ran Pino 10.4.0 and Winston 3.19.0 on Node 22.23.5 in our cloud sandbox (2 vCPUs), writing 200,000 lines of the same request record (reqId, route, status, message) with timestamps on both. We ran each variant three times pinned to one core and three times on two cores. Pino with a synchronous file destination took 338-388 ms in total and about 70 MB of RSS. Pino's default logger writing to stdout redirected to a file took 466-522 ms. Pino through a transport (pino/file in a worker thread) took 439-518 ms on one core, where the worker competes for the same CPU, and 334-388 ms on two cores, with the main-thread loop itself taking 249-274 ms; RSS was about 144 MB because of the worker. A buffered asynchronous destination (minLength 4096) took 589-648 ms in this tight loop, slower than the synchronous one, because the loop never yields for the buffer to drain. Winston's File transport finished its loop in 127-144 ms but then took until 1,124-1,332 ms to write everything, holding about 125-130 MB; its Console transport took 1,239-1,464 ms and about 390 MB. Lines averaged 134 bytes for Pino and 144 for Winston. Pino's own benchmark page reports a similar gap (about 115 ms against 270 ms for its 'hello world' test); these are its figures, not ours.

Errors, redaction and the cost of disabled levels

We logged one Error with a cause and a code property. Pino's log.error(err) and log.error({ err, userId: 7 }, 'query failed') both produced an err object with type, message ('db timeout: ECONNRESET', cause appended), a stack that included the cause and code: 'ETIMEDOUT'. The catch is the key name: log.error({ error: err }) kept only { code } because the serializer is registered for err. Winston with its default json() format turned log.error(err) into {"code":"ETIMEDOUT","level":"error"}, with no message and no stack, and log.error('query failed', { err }) lost the error the same way. log.error('query failed', err) did include the stack, with the messages concatenated to 'query failed db timeout' and the cause as an empty object. Adding format.errors({ stack: true }) fixed the bare error case. For secrets, Pino's redact option replaced req.headers.authorization, user.password and *.token with [Redacted] in our test; Winston has no built-in equivalent, so you write a format. Finally, we called debug() 10 million times with the level set to info. Pino took 40-50 ms because disabled methods are no-ops; Winston took 6.8-7.0 s, about 0.7 µs per call, because each call still builds an info object and pushes it into the stream before the level check drops it.

Shutdown: what survives process.exit()

Lost logs at exit are the most common logging bug in Node.js services, so we logged 50,000 lines and called process.exit(0) immediately, three times per setup. Pino's default logger kept all 50,000 lines both when stdout was a file and when it was piped to another process, and the worker-thread transport also kept all 50,000. Pino's buffered destination opened on a file path behaved differently: calling process.exit() before the file had finished opening threw 'sonic boom is not ready yet' from Pino's exit handler and wrote nothing; once we waited for the destination's ready event, all 50,000 lines arrived. Winston's File transport kept nothing when exit came straight after logging (the file was not even created), and kept 1 of 50,000 lines when we gave the file 300 ms to open first, because the transport writes asynchronously through a stream. The documented fix works: calling logger.end() and exiting on the finish event wrote all 50,000. Winston's Console transport kept all 50,000 lines when stdout was a file but only 6,110, 13,449 and 10,767 of 50,000 when stdout was a pipe, which is how logs reach a container runtime or process manager. Pino's async docs add a caution for AWS Lambda: use sync: true there, because the runtime can freeze before buffered logs are written.

Limits, migration and when not to use each

Do not choose Pino if your team reads raw logs in a terminal all day and does not want a pretty-printer in the pipeline, or if you need many differently formatted outputs and would rather configure them in one place than run transports. Use pino-pretty only in development: the Pino docs note that logger.flush() does not guarantee pino-pretty has written its output. Avoid buffered file destinations in short-lived scripts unless you wait for ready, and keep the err key for errors. Do not choose Winston for high-volume services where logging is on the request path, for short-lived processes that exit with process.exit(), or for containers that log to a pipe, unless you end the logger and wait for finish. Configure format.errors({ stack: true }) on day one. Also weigh maintenance: Pino shipped five releases in 2026 and its repository was pushed on 26 November 2026; Winston's last release is 3.19.0 from December 2025. Migration from Winston to Pino is mostly mechanical but touches every call site: swap log.info('msg', meta) for log.info(meta, 'msg'), map custom levels with Pino's customLevels option, replace per-transport formats with Pino transports or a log shipper, and check that your log platform reads numeric levels, or use formatters.level to emit labels (Pino 10.4.0 warns when that is combined with multi-target transports). Both are free and MIT-licensed.

Verdict

Pick Pino for new Node.js services. It was about three times faster than Winston at writing structured lines in our runs and used a fraction of the memory, but the stronger reasons are the defaults: errors logged with log.error(err) keep their message, cause and stack, secrets can be redacted by path without extra code, disabled debug calls cost almost nothing, and the stdout and transport paths kept every line when the process exited abruptly. If you run Fastify you already have it. Pick Winston when you genuinely need several in-process outputs with different formats and levels, custom level names, or a community transport that has no Pino equivalent, and when log volume is moderate. If you do, add format.errors({ stack: true }) before json(), end the logger and wait for finish before exiting, and do not put debug calls in hot loops. If you already run Winston and it works, migrate when you hit throughput, memory or lost-log problems rather than for the benchmark alone: the change touches every call site, because Pino takes the object first and the message second, and Winston takes the message first.

All Comparisons

Pino vs Winston — FAQ

Common questions answered from the comparison above

Is Pino faster than Winston?

In our runs on Node 22.23.5, yes: 200,000 structured lines to a file took 338-388 ms with Pino's synchronous destination and 1,124-1,332 ms with Winston's File transport, and Pino used about 70 MB against 125-130 MB. Disabled debug calls were 40-50 ms against 6.8-7.0 s for 10 million calls.

Why does Winston log my error as an empty object?

With the default json() format, an Error's message and stack are not enumerable properties, so log.error(err) kept only custom fields such as code in our test. Add winston.format.errors({ stack: true }) before json(), or pass the error as the second argument, log.error('msg', err).

How do I make Winston flush logs before the process exits?

Call logger.end() and exit in the logger's finish event, as the Winston README describes. In our test that wrote all 50,000 lines, while calling process.exit() straight after logging kept 1 of 50,000 lines with the File transport.

Do I need pino-pretty in production?

No. Pino writes JSON, which log pipelines expect. pino-pretty is meant for development terminals; the Pino docs note that logger.flush() does not guarantee pino-pretty has written its formatted output.

Does Pino redact passwords and tokens?

Yes, with the redact option. In our test, paths req.headers.authorization, user.password and *.token were all replaced with [Redacted]. Winston has no built-in redaction; you write a custom format.

Is Winston still maintained in 2026?

Its latest release is 3.19.0 from 7 December 2025, with no releases in 2026 as of 27 November 2026, and the repository lists about 556 open issues and pull requests. Pino released 10.1.1 to 10.4.0 during 2026.

Get the next comparison by email

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.