{"_id":"@depup/pino-pretty","_rev":"3-d9b398d42a94f8b8fc2315ec842180d6","name":"@depup/pino-pretty","dist-tags":{"latest":"13.1.3-depup.2"},"versions":{"13.1.3-depup.0":{"name":"@depup/pino-pretty","version":"13.1.3-depup.0","keywords":["depup","dependency-bumped","updated-deps","pino-pretty","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","_id":"@depup/pino-pretty@13.1.3-depup.0","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"homepage":"https://github.com/pinojs/pino-pretty#readme","bugs":{"url":"https://github.com/pinojs/pino-pretty/issues"},"bin":{"pino-pretty":"bin.js"},"tsd":{"directory":"./test/types"},"dist":{"shasum":"1e26e29e7d65cf61f6e7f2dc3689ab56c2ba5ce5","tarball":"https://registry.npmjs.org/@depup/pino-pretty/-/pino-pretty-13.1.3-depup.0.tgz","fileCount":79,"integrity":"sha512-9vN/Kg/6LtY9y41mbQkV9lrvgia/7kwSVDmePkd1hmJriWQoQbudHtM81pXCRMaLeYc2BUYlHacLq6ZRbCQvqA==","signatures":[{"sig":"MEUCIHyG3h8+gq4uB3ktRWeBJUAvUAd8IuIvwaLWJnFMd2plAiEA4bNZ8dmpZyHvb5LtrxCDBKSFKsI7JVmWPveRecXN9kU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":248502},"main":"index.js","type":"commonjs","depup":{"changes":{"pump":{"to":"^3.0.4","from":"^3.0.0"},"minimist":{"to":"^1.2.8","from":"^1.2.6"},"colorette":{"to":"^2.0.20","from":"^2.0.7"},"fast-copy":{"to":"^4.0.2","from":"^4.0.0"},"dateformat":{"to":"^5.0.3","from":"^4.6.3"},"sonic-boom":{"to":"^4.2.1","from":"^4.0.1"},"on-exit-leak-free":{"to":"^2.1.2","from":"^2.1.0"},"secure-json-parse":{"to":"^4.1.0","from":"^4.0.0"},"strip-json-comments":{"to":"^5.0.3","from":"^5.0.2"}},"smokeTest":"passed","depsUpdated":9,"processedAt":"2026-03-09T04:47:02.768Z","originalPackage":"pino-pretty","originalVersion":"13.1.3"},"types":"index.d.ts","gitHead":"6c6a460ead93ca2f5c9fd63033c7e8abff68c47d","scripts":{"ci":"eslint && borp --check-coverage && npm run test-types","lint":"eslint","test":"borp","lint:fix":"eslint --fix","test-types":"tsc && tsd && attw --pack .","test:watch":"borp -w --reporter gh","test:report":"c8 --reporter html borp"},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"repository":{"url":"git+ssh://git@github.com/pinojs/pino-pretty.git","type":"git"},"_npmVersion":"10.8.2","description":"[DepUp] Prettifier for Pino log lines","directories":{},"_nodeVersion":"20.20.0","dependencies":{"pump":"^3.0.4","joycon":"^3.1.1","help-me":"^5.0.0","minimist":"^1.2.8","colorette":"^2.0.20","fast-copy":"^4.0.2","dateformat":"^5.0.3","sonic-boom":"^4.2.1","on-exit-leak-free":"^2.1.2","secure-json-parse":"^4.1.0","fast-safe-stringify":"^2.1.1","strip-json-comments":"^5.0.3","pino-abstract-transport":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.0","tsd":"^0.33.0","borp":"^0.21.0","pino":"^10.1.0","eslint":"^9.37.0","rimraf":"^6.0.1","semver":"^7.6.0","fastbench":"^1.0.1","typescript":"~5.9.2","@types/node":"^24.0.8","neostandard":"^0.12.2","@arethetypeswrong/cli":"^0.18.1","@jsumners/assert-match":"^1.0.0","@jsumners/line-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pino-pretty_13.1.3-depup.0_1773031624868_0.20352673121783105","host":"s3://npm-registry-packages-npm-production"}},"13.1.3-depup.1":{"name":"@depup/pino-pretty","version":"13.1.3-depup.1","keywords":["pino-pretty","depup","updated-dependencies","security","latest","patched","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","_id":"@depup/pino-pretty@13.1.3-depup.1","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"homepage":"https://github.com/pinojs/pino-pretty#readme","bugs":{"url":"https://github.com/pinojs/pino-pretty/issues"},"bin":{"pino-pretty":"bin.js"},"tsd":{"directory":"./test/types"},"dist":{"shasum":"e12966db1381405f797c78f7f30be2f3c24e8095","tarball":"https://registry.npmjs.org/@depup/pino-pretty/-/pino-pretty-13.1.3-depup.1.tgz","fileCount":79,"integrity":"sha512-MG3ykNKChZaWZtqzB/ce2wQ8l5AUZPzlPKwBKDvXLpf15z4+H6smyqklK3jl/6JjQ8vDXZGMqPBuHHBcTO5Yhg==","signatures":[{"sig":"MEYCIQCk/mQIK05FtzI6DQd6PBfTiU7e/iMqBGWhBHYNioz0+QIhAMkP/fIrDQtXRAdEnnfPDUKukuXLdtNJ9whTzFEzCOgu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":248550},"main":"index.js","type":"commonjs","depup":{"changes":{"pump":{"to":"^3.0.4","from":"^3.0.0"},"minimist":{"to":"^1.2.8","from":"^1.2.6"},"colorette":{"to":"^2.0.20","from":"^2.0.7"},"fast-copy":{"to":"^4.0.2","from":"^4.0.0"},"dateformat":{"to":"^5.0.3","from":"^4.6.3"},"sonic-boom":{"to":"^5.0.0","from":"^4.0.1"},"on-exit-leak-free":{"to":"^2.1.2","from":"^2.1.0"},"secure-json-parse":{"to":"^4.1.0","from":"^4.0.0"},"strip-json-comments":{"to":"^5.0.3","from":"^5.0.2"}},"smokeTest":"passed","depsUpdated":9,"processedAt":"2026-03-31T12:32:29.021Z","originalPackage":"pino-pretty","originalVersion":"13.1.3"},"types":"index.d.ts","gitHead":"bae6d2023b703f3f276e4dad96a18ad81639b3da","scripts":{"ci":"eslint && borp --check-coverage && npm run test-types","lint":"eslint","test":"borp","lint:fix":"eslint --fix","test-types":"tsc && tsd && attw --pack .","test:watch":"borp -w --reporter gh","test:report":"c8 --reporter html borp"},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"repository":{"url":"git+ssh://git@github.com/pinojs/pino-pretty.git","type":"git"},"_npmVersion":"11.9.0","description":"Prettifier for Pino log lines (with updated dependencies)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"pump":"^3.0.4","joycon":"^3.1.1","help-me":"^5.0.0","minimist":"^1.2.8","colorette":"^2.0.20","fast-copy":"^4.0.2","dateformat":"^5.0.3","sonic-boom":"^5.0.0","on-exit-leak-free":"^2.1.2","secure-json-parse":"^4.1.0","fast-safe-stringify":"^2.1.1","strip-json-comments":"^5.0.3","pino-abstract-transport":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.0","tsd":"^0.33.0","borp":"^0.21.0","pino":"^10.1.0","eslint":"^9.37.0","rimraf":"^6.0.1","semver":"^7.6.0","fastbench":"^1.0.1","typescript":"~5.9.2","@types/node":"^24.0.8","neostandard":"^0.12.2","@arethetypeswrong/cli":"^0.18.1","@jsumners/assert-match":"^1.0.0","@jsumners/line-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pino-pretty_13.1.3-depup.1_1774960357846_0.2659747994001602","host":"s3://npm-registry-packages-npm-production"}},"13.1.3-depup.2":{"name":"@depup/pino-pretty","version":"13.1.3-depup.2","description":"Prettifier for Pino log lines (with updated dependencies)","type":"commonjs","main":"index.js","types":"index.d.ts","bin":{"pino-pretty":"bin.js"},"scripts":{"ci":"eslint && borp --check-coverage && npm run test-types","lint":"eslint","lint:fix":"eslint --fix","test":"borp","test-types":"tsc && tsd && attw --pack .","test:watch":"borp -w --reporter gh","test:report":"c8 --reporter html borp"},"repository":{"type":"git","url":"git+ssh://git@github.com/pinojs/pino-pretty.git"},"keywords":["pino-pretty","depup","updated-dependencies","security","latest","patched","pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/pinojs/pino-pretty/issues"},"homepage":"https://github.com/pinojs/pino-pretty#readme","dependencies":{"colorette":"^2.0.20","dateformat":"^5.0.3","fast-copy":"^4.1.0","fast-safe-stringify":"^2.1.1","help-me":"^5.0.0","joycon":"^3.1.1","minimist":"^1.2.8","on-exit-leak-free":"^2.1.2","pino-abstract-transport":"^3.0.0","pump":"^3.0.4","secure-json-parse":"^4.1.0","sonic-boom":"^5.0.1","strip-json-comments":"^5.0.3"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.1","@jsumners/assert-match":"^1.0.0","@jsumners/line-reporter":"^1.0.1","@types/node":"^24.0.8","borp":"^0.21.0","eslint":"^9.37.0","fastbench":"^1.0.1","neostandard":"^0.12.2","pino":"^10.1.0","rimraf":"^6.0.1","semver":"^7.6.0","tap":"^16.0.0","tsd":"^0.33.0","typescript":"~5.9.2"},"tsd":{"directory":"./test/types"},"depup":{"changes":{"colorette":{"from":"^2.0.7","to":"^2.0.20"},"dateformat":{"from":"^4.6.3","to":"^5.0.3"},"fast-copy":{"from":"^4.0.0","to":"^4.1.0"},"minimist":{"from":"^1.2.6","to":"^1.2.8"},"on-exit-leak-free":{"from":"^2.1.0","to":"^2.1.2"},"pump":{"from":"^3.0.0","to":"^3.0.4"},"secure-json-parse":{"from":"^4.0.0","to":"^4.1.0"},"sonic-boom":{"from":"^4.0.1","to":"^5.0.1"},"strip-json-comments":{"from":"^5.0.2","to":"^5.0.3"}},"depsUpdated":9,"originalPackage":"pino-pretty","originalVersion":"13.1.3","processedAt":"2026-08-31T08:13:55.037Z","smokeTest":"passed"},"gitHead":"403c12cad31b5bc103b60e37890564911c9d655f","_id":"@depup/pino-pretty@13.1.3-depup.2","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-/RcDSPPU6YYFtj0z2burFSX1RjeJ6Y5RcEIM5jMayd/XtEk3m/Aza/d0XNxBXAiaOosbB9NdQHQDypIQw2rH+g==","shasum":"7f1b35948d64c6dd2ed2d77acdc6abbd489c5929","tarball":"https://registry.npmjs.org/@depup/pino-pretty/-/pino-pretty-13.1.3-depup.2.tgz","fileCount":79,"unpackedSize":248550,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDr4SGrZrwNIU/iR5a+uBaI4u1X92SGl72eAcorakVC8QIhAKz5F8ZkmieddwVrwtCKrDu+cSR1Xm38I+P/Esri0s5i"}]},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"directories":{},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pino-pretty_13.1.3-depup.2_1788164047725_0.13747097989782264"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-09T04:47:04.776Z","modified":"2026-08-31T08:14:08.045Z","13.1.3-depup.0":"2026-03-09T04:47:05.017Z","13.1.3-depup.1":"2026-03-31T12:32:38.025Z","13.1.3-depup.2":"2026-08-31T08:14:07.856Z"},"bugs":{"url":"https://github.com/pinojs/pino-pretty/issues"},"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","homepage":"https://github.com/pinojs/pino-pretty#readme","keywords":["pino-pretty","depup","updated-dependencies","security","latest","patched","pino"],"repository":{"type":"git","url":"git+ssh://git@github.com/pinojs/pino-pretty.git"},"description":"Prettifier for Pino log lines (with updated dependencies)","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"readme":"<a id=\"intro\"></a>\n# pino-pretty\n\n[![NPM Package Version](https://img.shields.io/npm/v/pino-pretty)](https://www.npmjs.com/package/pino-pretty)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pinojs/pino-pretty/ci.yml?branch=master)](https://github.com/pinojs/pino-pretty/actions?query=workflow%3ACI)\n[![Coverage Status](https://img.shields.io/coveralls/github/pinojs/pino-pretty)](https://coveralls.io/github/pinojs/pino-pretty?branch=master)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)\n\nThis module provides a basic [ndjson](https://github.com/ndjson/ndjson-spec) formatter to be used in __development__. If an\nincoming line looks like it could be a log line from an ndjson logger, in\nparticular the [Pino](https://getpino.io/) logging library, then it will apply\nextra formatting by considering things like the log level and timestamp.\n\nA standard Pino log line like:\n\n```\n{\"level\":30,\"time\":1522431328992,\"msg\":\"hello world\",\"pid\":42,\"hostname\":\"foo\",\"v\":1}\n```\n\nWill format to:\n\n```\n[17:35:28.992] INFO (42): hello world\n```\n\nIf you landed on this page due to the deprecation of the `prettyPrint` option\nof `pino`, read the [Programmatic Integration](#integration) section.\n\n<a id=\"example\"></a>\n## Example\n\nUsing the [example script][exscript] from the Pino module, we can see what the\nprettified logs will look like:\n\n![demo](demo.png)\n\n[exscript]: https://github.com/pinojs/pino/blob/25ba61f40ea5a1a753c85002812426d765da52a4/examples/basic.js\n\n<a id=\"install\"></a>\n## Install\n\n```sh\nnpm install -g pino-pretty\n```\n\n<a id=\"usage\"></a>\n## Usage\n\nIt is recommended to use `pino-pretty` with `pino`\nby piping output to the CLI tool:\n\n```sh\nnode app.js | pino-pretty\n```\n\n<a id=\"cliargs\"></a>\n### CLI Arguments\n\n- `--colorize` (`-c`): Adds terminal color escape sequences to the output.\n- `--no-colorizeObjects`: Suppress colorization of objects.\n- `--crlf` (`-f`): Appends carriage return and line feed, instead of just a line\n  feed, to the formatted log line.\n- `--errorProps` (`-e`): When formatting an error object, display this list\n  of properties. The list should be a comma-separated list of properties Default: `''`.\n  Do not use this option if logging from pino@7. Support will be removed from future versions.\n- `--levelFirst` (`-l`): Display the log level name before the logged date and time.\n- `--errorLikeObjectKeys` (`-k`): Define the log keys that are associated with\n  error like objects. Default: `err,error`.\n- `--messageKey` (`-m`): Define the key that contains the main log message.\n  Default: `msg`.\n- `--levelKey` (`--levelKey`): Define the key that contains the level of the log. Nested keys are supported with each property delimited by a dot character (`.`).\n  Keys may be escaped to target property names that contains the delimiter itself:\n  (`--levelKey tags\\\\.level`).\n  Default: `level`.\n- `--levelLabel` (`-b`): Output the log level using the specified label.\n  Default: `levelLabel`.\n- `--minimumLevel` (`-L`): Hide messages below the specified log level. Accepts a number, `trace`, `debug`, `info`, `warn`, `error`, or `fatal`. If any more filtering is required, consider using [`jq`](https://stedolan.github.io/jq/).\n- `--customLevels` (`-x`): Override default levels with custom levels, e.g. `-x err:99,info:1`\n- `--customColors` (`-X`): Override default colors with custom colors, e.g. `-X err:red,info:blue`\n- `--useOnlyCustomProps` (`-U`): Only use custom levels and colors (if provided) (default: true); else fallback to default levels and colors, e.g. `-U false`\n- `--messageFormat` (`-o`): Format output of message, e.g. `{levelLabel} - {pid} - url:{req.url}` will output message: `INFO - 1123 - url:localhost:3000/test`\n  Default: `false`\n- `--timestampKey` (`-a`): Define the key that contains the log timestamp.\n  Default: `time`.\n- `--translateTime` (`-t`): Translate the epoch time value into a human-readable\n  date and time string. This flag also can set the format string to apply when\n  translating the date to a human-readable format. For a list of available pattern\n  letters, see the [`dateformat` documentation](https://www.npmjs.com/package/dateformat).\n  - The default format is `HH:MM:ss.l` in the local timezone.\n  - Require a `UTC:` prefix to translate time to UTC, e.g. `UTC:yyyy-mm-dd HH:MM:ss.l o`.\n  - Require a `SYS:` prefix to translate time to the local system's time zone. A\n    shortcut `SYS:standard` to translate time to `yyyy-mm-dd HH:MM:ss.l o` in\n    system time zone.\n- `--ignore` (`-i`): Ignore one or several keys, nested keys are supported with each property delimited by a dot character (`.`),\n  keys may be escaped to target property names that contains the delimiter itself:\n  (`-i time,hostname,req.headers,log\\\\.domain\\\\.corp/foo`).\n  The `--ignore` option would be ignored, if both `--ignore` and `--include` are passed.\n  Default: `hostname`.\n- `--include` (`-I`): The opposite of `--ignore`. Include one or several keys.\n- `--hideObject` (`-H`): Hide objects from output (but not error object)\n- `--singleLine` (`-S`): Print each log message on a single line (errors will still be multi-line)\n- `--config`: Specify a path to a config file containing the pino-pretty options.  pino-pretty will attempt to read from a `.pino-prettyrc` in your current directory (`process.cwd`) if not specified\n\n<a id=\"integration\"></a>\n## Programmatic Integration\n\nWe recommend against using `pino-pretty` in production and highly\nrecommend installing `pino-pretty` as a development dependency.\n\n```bash\nnpm install --save-dev pino-pretty\n```\n\nInstall `pino-pretty` alongside `pino` and set the transport target to `'pino-pretty'`:\n\n```js\nconst pino = require('pino')\nconst logger = pino({\n  transport: {\n    target: 'pino-pretty'\n  },\n})\n\nlogger.info('hi')\n```\n\nThe transport option can also have an options object containing `pino-pretty` options:\n\n```js\nconst pino = require('pino')\nconst logger = pino({\n  transport: {\n    target: 'pino-pretty',\n    options: {\n      colorize: true\n    }\n  }\n})\n\nlogger.info('hi')\n```\n\nUse it as a stream:\n\n```js\nconst pino = require('pino')\nconst pretty = require('pino-pretty')\nconst logger = pino(pretty())\n\nlogger.info('hi')\n```\n\nOptions are also supported:\n\n```js\nconst pino = require('pino')\nconst pretty = require('pino-pretty')\nconst stream = pretty({\n  colorize: true\n})\nconst logger = pino(stream)\n\nlogger.info('hi')\n```\n\nSee the [Options](#options) section for all possible options.\n\nThe following configuration ensures that `pino-pretty` is activated only in development mode.\n\n```js\nconst pino = require('pino')\n\n// Define the transport configuration only when the output stream is connected to a TTY\nconst transport =\n  process.stdout.isTTY\n    ? { transport: { target: 'pino-pretty' } }\n    : {};\n\nconst logger = pino({\n  ...transport\n})\n\nlogger.info('hi')\n```\n\n### Usage as a stream\n\nIf you are using `pino-pretty` as a stream and you need to provide options to `pino`,\npass the options as the first argument and `pino-pretty` as second argument:\n\n```js\nconst pino = require('pino')\nconst pretty = require('pino-pretty')\nconst stream = pretty({\n  colorize: true\n})\nconst logger = pino({ level: 'info' }, stream)\n\n// Nothing is printed\nlogger.debug('hi')\n```\n\n### Usage with Jest\n\nLogging with Jest is _problematic_, as the test framework requires no asynchronous operation to\ncontinue after the test has finished. The following is the only supported way to use this module\nwith Jest:\n\n```js\nimport pino from 'pino'\nimport pretty from 'pino-pretty'\n\ntest('test pino-pretty', () => {\n  const logger = pino(pretty({ sync: true }));\n  logger.info('Info');\n  logger.error('Error');\n});\n```\n\n### Handling non-serializable options\n\nUsing the new [pino v7+\ntransports](https://getpino.io/#/docs/transports?id=v7-transports) not all\noptions are serializable, for example if you want to use `messageFormat` as a\nfunction you will need to wrap `pino-pretty` in a custom module.\n\nExecuting `main.js` below will log a colorized `hello world` message using a\ncustom function `messageFormat`:\n\n```js\n// main.js\nconst pino = require('pino')\n\nconst logger = pino({\n  transport: {\n    target: './pino-pretty-transport',\n    options: {\n      colorize: true\n    }\n  },\n})\n\nlogger.info('world')\n```\n\n```js\n// pino-pretty-transport.js\nmodule.exports = opts => require('pino-pretty')({\n  ...opts,\n  messageFormat: (log, messageKey) => `hello ${log[messageKey]}`\n})\n```\n\n### Checking color support in TTY\n\nThis boolean returns whether the currently used TTY supports colorizing the logs.\n\n```js\nimport pretty from 'pino-pretty'\n\nif (pretty.isColorSupported) {\n  ...\n}\n\n```\n\n<a id=\"options\"></a>\n### Options\n\nThe options accepted have keys corresponding to the options described in [CLI Arguments](#cliargs):\n\n```js\n{\n  colorize: colorette.isColorSupported, // --colorize\n  colorizeObjects: true, //--colorizeObjects\n  crlf: false, // --crlf\n  errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys (not required to match custom errorKey with pino >=8.21.0)\n  errorProps: '', // --errorProps\n  levelFirst: false, // --levelFirst\n  messageKey: 'msg', // --messageKey (not required with pino >=8.21.0)\n  levelKey: 'level', // --levelKey\n  messageFormat: false, // --messageFormat\n  timestampKey: 'time', // --timestampKey\n  translateTime: false, // --translateTime\n  ignore: 'pid,hostname', // --ignore\n  include: 'level,time', // --include\n  hideObject: false, // --hideObject\n  singleLine: false, // --singleLine\n  customColors: 'err:red,info:blue', // --customColors\n  customLevels: 'err:99,info:1', // --customLevels (not required with pino >=8.21.0)\n  levelLabel: 'levelLabel', // --levelLabel\n  minimumLevel: 'info', // --minimumLevel\n  useOnlyCustomProps: true, // --useOnlyCustomProps\n  // The file or file descriptor (1 is stdout) to write to\n  destination: 1,\n\n  // Alternatively, pass a `sonic-boom` instance (allowing more flexibility):\n  // destination: new SonicBoom({ dest: 'a/file', mkdir: true })\n\n  // You can also configure some SonicBoom options directly\n  sync: false, // by default we write asynchronously\n  append: true, // the file is opened with the 'a' flag\n  mkdir: true, // create the target destination\n\n\n  customPrettifiers: {}\n}\n```\n\nThe `colorize` default follows\n[`colorette.isColorSupported`](https://github.com/jorgebucaran/colorette#iscolorsupported).\n\nThe defaults for `sync`, `append`, `mkdir` inherit from\n[`SonicBoom(opts)`](https://github.com/pinojs/sonic-boom#API).\n\n`customPrettifiers` option provides the ability to add a custom prettify function\nfor specific log properties. `customPrettifiers` is an object, where keys are\nlog properties that will be prettified and value is the prettify function itself.\nFor example, if a log line contains a `query` property,\nyou can specify a prettifier for it:\n\n```js\n{\n  customPrettifiers: {\n    query: prettifyQuery\n  }\n}\n//...\nconst prettifyQuery = value => {\n  // do some prettify magic\n}\n```\n\nAll prettifiers use this function signature:\n\n```js\n['logObjKey']: (output, keyName, logObj, extras) => string\n```\n\n* `logObjKey` - name of the key of the property in the log object that should have this function applied to it\n* `output` - the value of the property in the log object\n* `keyName` - the name of the property (useful for `level` and `message` when `levelKey` or `messageKey` is used)\n* `logObj` - the full log object, for context\n* `extras` - an object containing **additional** data/functions created in the context of this pino-pretty logger or specific to the key (see `level` prettifying below)\n  * All `extras` objects contain `colors` which is a [Colorette](https://github.com/jorgebucaran/colorette?tab=readme-ov-file#supported-colors) object containing color functions. Colors are enabled based on `colorize` provided to pino-pretty or `colorette.isColorSupported` if `colorize` was not provided.\n\nAdditionally, `customPrettifiers` can be used to format the `time`, `hostname`,\n`pid`, `name`, `caller` and `level` outputs AS WELL AS any arbitrary key-value that exists on a given log object.\n\nAn example usage of `customPrettifiers` using all parameters from the function signature:\n\n```js\n{\n  customPrettifiers: {\n    // The argument for this function will be the same\n    // string that's at the start of the log-line by default:\n    time: timestamp => `🕰 ${timestamp}`,\n\n    // The argument for the level-prettifier may vary depending\n    // on if the levelKey option is used or not.\n    // By default this will be the same numerics as the Pino default:\n    level: logLevel => `LEVEL: ${logLevel}`,\n    // level provides additional data in `extras`:\n    // * label => derived level label string\n    // * labelColorized => derived level label string with colorette colors applied based on customColors and whether colors are supported\n    level: (logLevel, key, log, { label, labelColorized, colors }) => `LEVEL: ${logLevel} LABEL: ${levelLabel} COLORIZED LABEL: ${labelColorized}`,\n\n    // other prettifiers can be used for the other keys if needed, for example\n    hostname: hostname => `MY HOST: ${hostname}`,\n    pid: pid => pid,\n    name: (name, key, log, { colors }) => `${colors.blue(name)}`,\n    caller: (caller, key, log, { colors }) => `${colors.greenBright(caller)}`,\n    myCustomLogProp: (value, key, log, { colors }) => `My Prop -> ${colors.bold(value)} <--`\n  }\n}\n```\n\n`messageFormat` option allows you to customize the message output.\nA template `string` like this can define the format:\n\n```js\n{\n  messageFormat: '{levelLabel} - {pid} - url:{req.url}'\n}\n```\n\nIn addition to this, if / end statement blocks can also be specified.\nElse statements and nested conditions are not supported.\n\n```js\n{\n  messageFormat: '{levelLabel} - {if pid}{pid} - {end}url:{req.url}'\n}\n```\n\nThis option can also be defined as a `function` with this function signature:\n\n```js\n{\n  messageFormat: (log, messageKey, levelLabel, { colors }) => {\n    // do some log message customization\n    //\n    // `colors` is a Colorette object with colors enabled based on `colorize` option\n    return `This is a ${colors.red('colorized')}, custom message: ${log[messageKey]}`;\n  }\n}\n```\n\n## Limitations\n\nBecause `pino-pretty` uses stdout redirection, in some cases the command may\nterminate with an error due to shell limitations.\n\nFor example, currently, mingw64 based shells (e.g. Bash as supplied by [git for\nWindows](https://gitforwindows.org)) are affected and terminate the process with\na `stdout is not a tty` error message.\n\nAny PRs are welcomed!\n\n<a id=\"license\"></a>\n## License\n\nMIT License\n","readmeFilename":"Readme.md"}