A beautiful minimalist formatter for pino.
$ npm add pino pino-bravo
import pino from 'pino'
import pinoBravo from 'pino-bravo'
const logger = pino({
prettyPrint: true,
prettifier: pinoBravo(/* options */)
})
Option | Type | Default | Description |
---|---|---|---|
ignoreKeys |
string |
'hostname,pid,time' |
A comma-separated list of log keys to ignore. |
modules |
Record<string, Style> |
{} |
A map of modules (eg. browser, api, ...) and their associated colors (eg. green, magenta, ...). If omitted, colors are picked automatically. |
modulePadding |
number |
undefined |
Modules padding for alignement. If omitted and modules is provided, it will infer the padding automatically. Otherwise it will not pad modules. |