Open segevfiner opened 2 years ago
Consider using https://github.com/pinojs/pino-abstract-transport for this.
For anyone who's having trouble using this with the latest version of pino, here's a quick hack to get things working:
const pino = require('pino');
const pinoPretty = require('pino-pretty');
const pinoColada = require('pino-colada');
const logger = pino(
{
// pino options
},
pinoPretty({
hideObject: true,
levelKey: '',
messageFormat: pinoColada(),
singleLine: true,
timestampKey: ''
})
);
pretty-print
&prettifier
the new recommended way of integrating a prettifier via API is using apino.transport
.pino-pretty
supports this so can probably checked to see an example of how.