Major changes
- Drops support for no longer maintained versions of Node.js #776 #747
- Removes
v
from log lines #623 #620 - Logs literal
null
#711 #706 - Adds formatters for core log components (a powerful new way to customize how log lines are rendered; thank you @delvedor) #775 #764
- Softens language around the modes of logging available #791 #785
- Removes implicit appending of objects to message strings (see below) #795 #793
- Codifies LTS policy going forward #799
Implicit formatting removed #795
Previously, Pino emulated Bunyan's behavior when interpreting logs like:
log.info('a message', { an: 'object'})
log.info('a', 'silly', 'message')
The old behavior would result in 1 yielding "msg":"a message {\"an\":\"object\"}"
and 2 yielding
"msg":"a silly message"
. As of this release, 1 will yield "msg":"a message"
and 2 will yield "msg":"a"
.
To get the same results in Pino v6 as in previous releases actual format identifiers should be provided, e.g.:
log.info('a message %j', { an: 'object' })
log.info('a %s %s', 'silly', 'message')