cute & powerful ndjson log formatter for pino inspired by pino-colada
npm install miami-viceA cute & powerful ndjson formatter for pino.
Heavily inspired by pino-colada with lots of error & debug formatting mixed in.
For those of you wondering... a Miami Vice is half Piña Colada and half Strawberry Daiquiri 😉
``bash`
node server.js | miami-vice
`javascript`
const pino = require('pino');
const logger = pino({
prettyPrint: true,
prettifier: require('miami-vice')
});
, miami-vice returns a stream and pipes it
over to process.stdout. It will output a timestamp, a log level in a form of
an emoji, and a message.For
warn, error and fatal log levels any log record properties that are not automatically handled are printed
after the primary log message to aid in debugging.Error and stack trace information is always included and formatted for excellent readability whenever
an
err or error property is discovered.Express and Fastify request & response messages are handled including adding request ids to the log's
namespace and name format (wrapped in brackets).
Install
`bash
npm install miami-vice
``[1]: https://img.shields.io/npm/v/miami-vice.svg?style=flat-square
[2]: https://npmjs.org/package/miami-vice