A 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 😉
Pipe a server that uses pino into miami-vice for logging.
node server.js | miami-vice
In Process (as a prettifier)
const pino = require('pino');
const logger = pino({
prettyPrint: true,
prettifier: require('miami-vice')
});
After parsing input from server.js
, 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).
npm install miami-vice