pino
10.4.0 · 2 Oct 2026MIT76M / weekRepositoryHomepagenpmAtom feed
318 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 8.x
8.14.1
8 May 20238.14.0
8 May 2023Add crlf in LoggerOptions Interface
Support custom levels on browser
Add child method default generic type
What's Changed
Add crlf in LoggerOptions Interface
Support custom levels on browser
Add child method default generic type
Pass logger/child logger as param to mixin
8.12.1
3 May 20238.12.0
2 May 2023Add mightnight-smoker closes #1570
Remove (package.json).files
type: Add
disabledtopino.LoggerOptions
What's Changed
Add mightnight-smoker closes #1570
Remove (package.json).files
type: Add
disabledtopino.LoggerOptionsRemove type definition for pino 7.0 comment
Expose errWithCause to browser API & add Node v20
8.11.0
22 Feb 2023Add script to bump version
Add Node 19 to the CI
Fix msg precendence when sending a merging object with msg and err
What's Changed
Add script to bump version
Add Node 19 to the CI
Fix msg precendence when sending a merging object with msg and err
8.10.0
9 Feb 2023Add dedupe option to transport
8.9.0
6 Feb 2023Fix documentation example
Add yarn install to the documentation.
Remove defunct "Exit logging" link
What's Changed
Fix documentation example
Add yarn install to the documentation.
Remove defunct "Exit logging" link
remove: outdated/unused information from docs/pretty.md
Badges
Transports are always asynchronous
Add @logtail/pino to v7+ compatible transports
Allow message prefix - #544
8.8.0
15 Dec 2022Update async logging caveats documentation
Update hapi-pino usage example
Use safe stringify for redaction
What's Changed
Update async logging caveats documentation
Update hapi-pino usage example
Use safe stringify for redaction
Fix updating errorKey with default error serializer
8.7.0
20 Oct 2022Add DestinationStreamMetadata type to pino.d.ts
Remove pretty print in types, docs
Pass logger instance as an argument in
level-changeevent
8.6.0
19 Sep 2022Document how error is received from worker transport
Add
thistohooks.logMethodType
formatters.logwith a Record type
What's Changed
Document how error is received from worker transport
Add
thistohooks.logMethodType
formatters.logwith a Record typeCorrect type of
argspassed tohooks.logMethod
8.5.0
5 Sep 2022- security
GitHub Workflows security hardening
Fix transports doc pipeline example
Remove all mentions of final
What's Changed
Fix transports doc pipeline example
Remove all mentions of final
- security
GitHub Workflows security hardening
Added
onChildcallback with tests and documentation
8.4.2
19 Aug 2022Fix loading .js with pkg
What's Changed
Fix loading .js with pkg
8.4.1
12 Aug 2022Add pino-transport-datadog to transports.md
Simplify Google logging-specific configuration example
Default fd=1 in pino.destination if stdout has no file descriptor
8.3.1
27 Jul 2022Do not assume process.stdout has a file descriptor
8.3.0
21 Jul 2022Use https url in package.json homepage field
Use process.stdout if specified by the developer
8.1.0
22 Jun 2022publishing: Add preval pino version
Add documentation regard pino-sentry-transport
Update to on-exit-leak-free v2
What's Changed
publishing: Add preval pino version
Add documentation regard pino-sentry-transport
Update to on-exit-leak-free v2
Update abstract-transport to v1.0.0 and drop hack
8.0.0
1 Jun 2022- removed
Remove deprecated API and options in v7 option.
Async by default
What's Changed
- removed
Remove deprecated API and options in v7 option.
Async by default
- 7.x
7.11.0
26 Apr 2022Replace extreme destination with async destination
Missing bracket
Ensure first-class support for transpiled & ts code in transports
What's Changed
Replace extreme destination with async destination
Missing bracket
Ensure first-class support for transpiled & ts code in transports
7.10.0
8 Apr 2022Fix hasOwnProperty usage
Update tap config
Do not leak files when running tests
What's Changed
Fix hasOwnProperty usage
Update tap config
Do not leak files when running tests
Add missing require statement
Add LoggerExtras.setBindings to pino.d.ts
Add synchronous sleep in case of synchronous exit
Add LevelWithSilent as an exported type
Add option to pass custom levels down to
multistream()from transportBumped thread-stream version
Fix incorrect type definition of censor function
7.9.2
22 Mar 20227.9.1
17 Mar 2022Fix pino.multristream test failure.
7.9.0
17 Mar 2022Add level number to mixin callback
Run parent bindings formatter when creating child logger
Use pino/file instead of pino-pretty for caller transport tests
What's Changed
Add level number to mixin callback
Run parent bindings formatter when creating child logger
Use pino/file instead of pino-pretty for caller transport tests
7.8.1
9 Mar 2022Added documentation for MultiStreamRes, StreamEntry, DestinationStream and Level
Fix workflow target main branch workflow
Added newrelic pino extension to docs
What's Changed
Added documentation for MultiStreamRes, StreamEntry, DestinationStream and Level
Fix workflow target main branch workflow
Added newrelic pino extension to docs
Throw when using custom level formatters with multiple transports
7.8.0
15 Feb 2022Add
flushfunction to typesNew features must always target the master branch
Refactor the mixing logic
What's Changed
Add
flushfunction to typesNew features must always target the master branch
Refactor the mixing logic
Add action to check PR target
Add option
mixinMergeStrategy(to v7)
7.7.0
15 Feb 2022Add thread locking action
7.6.5
29 Jan 2022types: Child is not respect customLevels
Fix error in example
What's Changed
types: Child is not respect customLevels
Fix error in example
7.6.4
20 Jan 2022Added SECURITY.md
Stricter type
Test for multiple caller entries
What's Changed
Added SECURITY.md
Stricter type
Test for multiple caller entries
7.6.3
10 Jan 2022Passing stream to transport
Missing types
type: Add pipeline to pino.transport options
What's Changed
Passing stream to transport
Missing types
type: Add pipeline to pino.transport options
Call .end() on thread-stream before exiting the process.
7.6.2
28 Dec 2021Move from fastify-warning to process-warning
7.6.1
23 Dec 2021caller: Use calling file name for libraries calling Pino
7.6.0
20 Dec 2021Type regression on fastify
Improve transport/syncfalse test
Improved caller detection
What's Changed
Type regression on fastify
Improve transport/syncfalse test
Improved caller detection
7.5.1
1 Dec 2021Fix JSDOM TS issue.
7.4.1
24 Nov 2021Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
7.4.0
22 Nov 2021Update LTS document
Forward all unknown options passed to pino/file transport to destination
Consistently use the term mergingObject in the docs
What's Changed
Update LTS document
Forward all unknown options passed to pino/file transport to destination
Consistently use the term mergingObject in the docs
Coerce string integer destinations to file descriptors
7.3.0
18 Nov 2021Clarify that
watchFileCreatedfails are timeoutsAvoid duplicate action runs for eg. Dependabot
Pass mkdir option on pino/file transport to destination
What's Changed
Clarify that
watchFileCreatedfails are timeoutsAvoid duplicate action runs for eg. Dependabot
Pass mkdir option on pino/file transport to destination
Add node v17 to CI
Pass append option on pino/file transport to pino.destination function
7.2.0
10 Nov 2021Support bundlers.
Updated thread-stream to v0.13.0
7.0.5
25 Oct 2021Flush on exit
What's Changed
Flush on exit
7.0.4
25 Oct 2021Make transport Jest-aware
What's Changed
Make transport Jest-aware
7.0.2
15 Oct 2021Fix types for
pino.multistreamFix formatters when used along transport
Add transport option param to types
What's Changed
Fix types for
pino.multistreamFix formatters when used along transport
Add transport option param to types
7.0.1
14 Oct 2021Updated install instructions
7.0.0
14 Oct 2021- deprecated
Deprecate the prettyPrint option
- removed
Removed deprecated options in pino.child()
Atomic sync writes #102
New Features
pino.transport()Create a a stream that routes logs to a worker thread that
wraps around a Pino Transport.const pino = require('pino') const transport = pino.transport({ target: 'some-transport', options: { some: 'options for', the: 'transport' } }) pino(transport)Multiple transports may also be defined, and specific levels can be logged to each transport:
const pino = require('pino') const transports = pino.transport({ targets: [{ level: 'info', target: 'pino-pretty' }, { level: 'trace', target: 'pino/file', options: { destination: '/path/to/store/logs' } }] }) pino(transports)Transports may alternatively be arranged in a pipeline:
const logger = pino({ transport: { pipeline: [{ target: './my-transform.js' }, { // Use target: 'pino/file' to write to stdout // without any change. target: 'pino-pretty' }] } }) logger.info('hello world')For more on transports, how they work, and how to create them see the
Transports documentation.The internal implementation is based on
thread-stream⇗.`pino.multistream()``
We have embedded a part of
pino-multi-streaminto pino itself, so you would be able to write to multiple streams from the same pino instance:var fs = require('fs') var pino = require('pino') var streams = [ {stream: fs.createWriteStream('/tmp/info.stream.out')}, {level: 'debug', stream: fs.createWriteStream('/tmp/debug.stream.out')}, {level: 'fatal', stream: fs.createWriteStream('/tmp/fatal.stream.out')} ] var log = pino({ level: 'debug' // this MUST be set at the lowest level of all the destinations }, pino.multistream(streams)) log.debug('this will be written to /tmp/debug.stream.out') log.info('this will be written to /tmp/debug.stream.out and /tmp/info.stream.out') log.fatal('this will be written to /tmp/debug.stream.out, /tmp/info.stream.out and /tmp/fatal.stream.out')This differs from
pino.transport()as all the streams will be executed within the main thread, i.e. the one that created the pino instance.Added TypeScript types
Types have been added to the the project, so you can now use pino with TypeScript without downloading any additional types: you should remove
@types/pinofrom your project. The following typescript example would now work correctly:import { pino } from "pino"; const log = pino(); log.info("hello world"); log.error("this is at error level"); log.info("the answer is %d", 42); log.info({ obj: 42 }, "hello world"); log.info({ obj: 42, b: 2 }, "hello world"); log. info({ obj: { aa: "bbb" } }, "another");Updated sonic-boom
sonic-boom, our
fs.createWriteStream()replacement has become safer to use in v2.x.A few selected changes:
Atomic sync writes #102
Add retryEAGAIN callback function #95
Fix writing deadlock #104
flush() with no buffered data should work #105
Solved "exit" problem for
sync: falsedestinations and transportsThanks to the addition of
WeakRefandFinalizationRegistryto JavaScript (available in Node.js v14+) we can automatically flush asynchronous streams when the processes exits without leaking memory.Check out github.com/mcollina/on-exit-leak-free.
Breaking Changes
Deprecation of
prettyPrintoptionThe
prettyPrintoption has been deprecated in favor of the new transport system.Dropped Node.js v10.x
Node.js v10 went out of LTS/Maintenance in April 2021.
We are dropping support.Apply
errserializer everywhereWe will start applying the
errserializer also toErrorobjects passed in as first argument to log methods, e.g.log.info(new Error('kaboom'))will pass through the serializer.Removal of extreme mode
Extreme mode has been deprecated in previous release cycle and it has now been removed.
Pull Requests
Removed all outstanding deprecations
Pino.transport()
Add pino.multistream
Add TS types
Apply err serializer everywhere.
Make the nestedKey only take effect in the serialized object and fix error detection and serialization #885
Transport async function example
Make sure that the main thread stays alive to process stdout.
Completely removed extreme mode
Make ThreadStream sync: false (the default)
Automatically flush the logs on exit in Node v14+
Add overload to handle unknown returned by TS-4.4 for errors be default
pino-pretty transport convertion
Package manager CI action
- deprecated
Deprecate the prettyPrint option
Add transports constructor option
Use fastify-warning in v7
Document pino.transport() async startup
Improve TS types
- removed
Removed deprecated options in pino.child()
Update the
options.leveldocumentation of the child loggerMake pino.final sync flushes when no handler provided
Removed multistream prettyPrint deprecation and clean up docs
dep: Removes fast-safe-stringify dep
Remove whitespace from markdown files
Restore automerge
Removed coveralls, removed TS badge
Flush thread-stream missing callback
Transport pipeline
fix missing end quote in docs/transports.md
Correctly select the caller file when using the transport option
- 6.x
6.14.0
15 Feb 2022Add option
mixinMergeStrategy
6.13.4
28 Dec 2021Move from fastify-warning to process-warning
6.13.3
22 Sep 2021Disable 100% coverage check