{"name":"pino-pretty","version":"3.0.0-rc.2","keywords":["pino"],"author":{"name":"James Sumners","email":"james.sumners@gmail.com"},"license":"MIT","_id":"pino-pretty@3.0.0-rc.2","maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"watson","email":"w@tson.dk"}],"homepage":"https://github.com/pinojs/pino-pretty#readme","bugs":{"url":"https://github.com/pinojs/pino-pretty/issues"},"bin":{"pino-pretty":"./bin.js"},"dist":{"shasum":"839ef50fdfc2e2f7571d5d615728c895bec34452","tarball":"http://registry-npm.ywwl.com/pino-pretty/download/pino-pretty-3.0.0-rc.2.tgz","fileCount":18,"integrity":"sha512-q5avjM12jWPJUU42Q26xyGEujHUhSyPuw6/LxCNTrL/E48SHjqct+3tsOgCOZRbEG+5TnSJFuSx3sZzHkEqVgw==","signatures":[{"sig":"MEUCIQDU9SKf8hkrMOLMgI/02EMK9wPhFywlz4qK0CLIggVHbQIgKzZoKT2vneYfDqldOICmD7Ox6/liYC3yzU6R7uOY+NU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvGLNCRA9TVsSAnZWagAAuskP/03D56u/eBYS7CEtMc+D\nIBw0kzvgmh4p3OvizU9WcLcuyZAgcdqPc7nX2E/YvYrKsRY9xPFRtJs2OsQM\nTH5OSvkV23TwUKWFSyGYzl8Uanl9IH8dWZkGswO98KyHX4U2SDWIwYLru49G\nPOR/WA+0hkU3BHCVEX6STRh1UJ3Oxy6V7sl2wNrqibrI2PfgZ8/G9rVMjd35\nbyAseAngf9bomRYVKvDirxSEPcQZmGs0ygwJyAmrjabQODLYa/jPQRP56aOz\nfr7tvWFQSwrOMP5FkOeopGJNqszDSJ14bbpB4tveeCuQt6hzNYSgqG0wD8Bq\nsdjXPcbq60sbkWsyIV9z2CFB9YLCK2dERCi3FGkDpjxI2mMV9jEnwcrOOgEF\ng/lw4du7dYxYaeH+2HG6EGnjT9NY59r6UciKVSmXBrA19Rz6aBxyCHDCHwP8\njkuCU8HhstqL2GuBV44LNLJ10XuHilSH1D/m5WCBdt8Dx1XfO+IY5aNUMYTX\nxkol3kyn1NC7PLjVY+zkmQ3feyJYTMkD3Hze+pFW9h7aM2CrT5V+7VC02y+f\nYTn2srNrBK21Y3QzNYE5iIkrbMm8LPh8qziRl7zvVl64Rh9BQxL1QFIQh1FZ\nXg6vB5NdT2/6AtV2uH/+Tq8i11M9eJ2O5DJHLdYuEJoy7ZdD17XjvhMeMyfu\nIupO\r\n=NOrh\r\n-----END PGP SIGNATURE-----\r\n","size":184481,"noattachment":false,"key":"/pino-pretty/-/pino-pretty-3.0.0-rc.2.tgz"},"main":"index.js","readme":"<a id=\"intro\"></a>\n# pino-pretty\n\n[![Build Status](https://travis-ci.org/pinojs/pino-pretty.svg?branch=master)](https://travis-ci.org/pinojs/pino-pretty)\n[![Coverage Status](https://coveralls.io/repos/github/pinojs/pino-pretty/badge.svg?branch=master)](https://coveralls.io/github/pinojs/pino-pretty?branch=master)\n\nThis module provides a basic [ndjson](http://ndjson.org/) formatter. 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[1522431328992] INFO (42 on foo): hello world\n```\n\n<a id=\"example\"></a>\n## Example\n\nUsing the [example script][exscript] from the Pino module, and specifying\nthat logs should be colored and the time translated, we can see what the\nprettified logs will look like:\n\n![demo](demo.png)\n\n[exscript]: https://github.com/pinojs/pino/blob/fc4c83b/example.js\n\n<a id=\"install\"></a>\n## Install\n\n```sh\n$ npm install -g pino-pretty\n```\n\n<a id=\"usage\"></a>\n## Usage\n\nIt's recommended to use `pino-pretty` with `pino`\nby piping output to the CLI tool:\n\n```sh\npino 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- `--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- `--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- `--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 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 `yyyy-mm-dd HH:MM:ss.l o` in UTC.\n  - Require a `SYS:` prefix to translate time to the local system's timezone. A\n    shortcut `SYS:standard` to translate time to `yyyy-mm-dd HH:MM:ss.l o` in\n    system timezone.\n- `--search` (`-s`): Specify a search pattern according to\n  [jmespath](http://jmespath.org/).\n- `--ignore` (`-i`): Ignore one or several keys: (`-i time,hostname`)\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\nWhen installed, `pino-pretty` will be used by `pino` as the default\nprettifier.\n\nInstall `pino-pretty` alongside `pino` and set the\n`prettyPrint` option to `true`:\n\n```js\nconst pino = require('pino')\nconst logger = pino({\n  prettyPrint: true\n})\n\nlogger.info('hi')\n```\n\nThe `prettyPrint` option can also be an object containing `pretty-print`\noptions:\n\n```js\nconst pino = require('pino')\nconst logger = pino({\n  prettyPrint: { colorize: true }\n})\n\nlogger.info('hi')\n```\n\nSee the [Options](#options) section for all possible options.\n\n<a id=\"options\"></a>\n### Options\n\n`pino-pretty` exports a factory function that can be used to format log strings.\nThis factory function is used internally by Pino, and accepts an options argument\nwith keys corresponding to the options described in [CLI Arguments](#cliargs):\n\n```js\n{\n  colorize: chalk.supportsColor, // --colorize\n  crlf: false, // --crlf\n  errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys\n  errorProps: '', // --errorProps\n  levelFirst: false, // --levelFirst\n  messageKey: 'msg', // --messageKey\n  translateTime: false, // --translateTime\n  search: 'foo == `bar`', // --search\n  ignore: 'pid,hostname' // --ignore\n}\n```\n\nThe `colorize` default follows\n[`chalk.supportsColor](https://www.npmjs.com/package/chalk#chalksupportscolor).\n\n<a id=\"license\"><a>\n## License\n\nMIT License\n","gitHead":"410c1e8396915d704f73f6634aefb4a404d9c033","scripts":{"lint":"standard | snazzy","test":"tap --no-cov 'test/**/*.test.js'","lint-ci":"standard","test-ci":"tap --cov 'test/**/*.test.js'"},"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/pinojs/pino-pretty.git","type":"git"},"_npmVersion":"6.8.0","description":"Prettifier for Pino log lines","directories":{},"_nodeVersion":"10.15.2","dependencies":{"args":"^5.0.1","pump":"^3.0.0","chalk":"^2.4.2","bourne":"^1.1.2","split2":"^3.1.1","jmespath":"^0.15.0","dateformat":"^3.0.3","readable-stream":"^3.3.0","fast-safe-stringify":"^2.0.6"},"_hasShrinkwrap":false,"readmeFilename":"Readme.md","devDependencies":{"tap":"^12.6.1","pino":"^5.12.2","snazzy":"^8.0.0","standard":"^12.0.1","pre-commit":"^1.2.2"},"_npmOperationalInternal":{"tmp":"tmp/pino-pretty_3.0.0-rc.2_1555849932506_0.5909727970884295","host":"s3://npm-registry-packages"},"publish_time":1555849932746,"_cnpm_publish_time":1555849932746,"dist-tags":{"latest":"13.2.0","next":"3.0.0-rc.2"}}