{"_id":"zlogger","_rev":"10-45188b980ff60a7e6d3970c5c4327f59","name":"zlogger","dist-tags":{"latest":"2.1.1"},"versions":{"0.0.0":{"name":"zlogger","version":"0.0.0","_id":"zlogger@0.0.0","scripts":{},"_shasum":"43ae510951e12c9eae92133f22412c4dcba8ab6c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"43ae510951e12c9eae92133f22412c4dcba8ab6c","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-0.0.0.tgz","integrity":"sha512-oCG9HMFkmZmfmTRJHxag7h9bBt6/IvYa0/CZyTbiRjh8DX4Y8yClh2X+zs5SEmcicnDserupfpulkBRNDaVuFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8DbyugUtWO/V0Lq6NLeCnOdM1x/4kT2h4meACfesrKAiAK9XoCL7os4B+xCScwz4VOQF6/ucO1ZVbf4FjQ2URgVg=="}]},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/zlogger-0.0.0.tgz_1480097963727_0.9148246904369444"},"directories":{}},"1.0.0":{"name":"zlogger","version":"1.0.0","description":"The last console logger","repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"dependencies":{"pumpify":"^1.3.5","split2":"^2.1.0","through2":"^2.0.1"},"devDependencies":{"egg-ci":"^1.0.0","egg-bin":"^1.0.0","autod":"^2.7.1","coffee":"^3.3.0","eslint":"^3.10.2","eslint-config-egg":"^3.2.0","intelli-espower-loader":"^1.0.1","power-assert":"^1.4.2"},"engines":{"node":">=4.3.1"},"ci":{"version":"4, 6, 7"},"scripts":{"test":"npm run lint && npm run test-local","test-local":"egg-bin test -r intelli-espower-loader","cov":"egg-bin cov -r intelli-espower-loader","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"fb519f7c714862bf2b97e30be85e374b34ad9ee2","bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"_id":"zlogger@1.0.0","_shasum":"330b0f030e299d014296830fa30e20b94d826eb7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"330b0f030e299d014296830fa30e20b94d826eb7","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-1.0.0.tgz","integrity":"sha512-Ao31BDsirVWMRdWEGXunMaOzbN2E/i+mHFviJIC8bnBKz+4eyaVRuJ+yFla9DtY2YZAEZNcHlcObVYJ08YrcDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCsA2lyTa+m0x1WTYhGSzfltvBBUE51hqn+qqnoJLZXgIgPx3kT22moH1YUPjcg4EF97TR8wQkhOsrMx/qludey3Y="}]},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/zlogger-1.0.0.tgz_1480405875379_0.7876211616676301"},"directories":{}},"1.1.0":{"name":"zlogger","version":"1.1.0","description":"The last console logger","repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"dependencies":{"pumpify":"^1.3.5","split2":"^2.1.0","through2":"^2.0.1"},"devDependencies":{"egg-ci":"^1.0.0","egg-bin":"^1.0.0","autod":"^2.7.1","coffee":"^3.3.0","eslint":"^3.10.2","eslint-config-egg":"^3.2.0","intelli-espower-loader":"^1.0.1","power-assert":"^1.4.2"},"engines":{"node":">=4.3.1"},"ci":{"version":"4, 6, 7"},"scripts":{"test":"npm run lint && npm run test-local","test-local":"egg-bin test -r intelli-espower-loader","cov":"egg-bin cov -r intelli-espower-loader","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"files":["index.js"],"author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"aaab899e6fc7bf416e1b8abae247dc0d36435e16","bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"_id":"zlogger@1.1.0","_shasum":"bc0d4a1a50d88b4e027636060c7a23682754744e","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"shasum":"bc0d4a1a50d88b4e027636060c7a23682754744e","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-1.1.0.tgz","integrity":"sha512-WjRPkjHe4rajXun45zZRAnViTSLkIr2PEFI303u+3NYIkhWqxhpTr0j67XPzhTJMmDH27pGoTSxGg/qP8FiaJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDolYw8LZAyMm6MDirhohMcKpoVjqMe1VONJ2o+/NVPMwIgN1aCaM1/h90/flQZVfgNeBgfFOvcMmPR4clk35xvNf4="}]},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/zlogger-1.1.0.tgz_1481623363506_0.8928275026846677"},"directories":{}},"2.0.0":{"name":"zlogger","version":"2.0.0","description":"The last console logger","repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"dependencies":{"pumpify":"^1.5.1","split2":"^3.1.0","through2":"^3.0.0"},"devDependencies":{"autod":"^3.0.1","coffee":"^5.1.1","egg-bin":"^4.9.0","egg-ci":"^1.11.0","eslint":"^5.10.0","eslint-config-egg":"^7.1.0"},"engines":{"node":">=8"},"ci":{"version":"8, 10"},"scripts":{"test":"npm run lint && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"b2cb68564f686e95ec67cd1d5d000f5a339717f2","bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"_id":"zlogger@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-SGILpmT0kdQE9eMDFNP+IzOAE8++TthIOb7NeL9uYplpIkVlNBM1jD4WnfLyTzSHS5oKqpUAPSveJrkwKMjzLQ==","shasum":"a8c1003d62cc57b7d6e8cf2ef895de9b96992110","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-2.0.0.tgz","fileCount":4,"unpackedSize":8609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGgF3CRA9TVsSAnZWagAAw1IP/AwM+88CUCLwqLtcI1Jj\nDFgR5WXxEaM/05+emX+3MtAeDEKJHRtfrxAXJed1dmhxgb9eS0FWN+ts/aL2\n2k/L+UThOCclETq0IAxErFI2ZNb6HXIbtETmKulYeDt6FCdnts6X2d30fU22\nk8svom32kDFTH10mtL2cBwcIBCrhjOudbXK5mT3Jmr2QggBA6/DuN3DnLhc6\nth382OkXkDaL9pg9ynHKlpv7B2eDHRWjrm8qVuAnucYErqKb4E+Yoe7AevuX\nbb94WP9IQgW3c/v5O3cwO36NLhl3APVqbNE3k1qmr45YSqJyVehIh4sn7/e7\n6064/ecFOJqautPAQBhmmO6A18T4AS5z3doSw8oKM4NgyzTdb4kjz3cS627+\n8p0GQN2T9xnHrzqYYsus9WcljiQlkDZH1WlamcY3pYGcFgROH2Wk5AdRWUNC\nXMRkYUjORbQo70Gu12JZb+IdQ4BTMqlrvigfm26DiQnXgkhCchHMXGVQj4uf\n57IHm1LoxygsQO7cjz97ttF5goDzALD8jj96broQ0VfEzuBrMsT1Gom+cq9+\ns78iRktjh4Zv9laE47c1XF8k3y4tRENhTC8NOFeu78TzfESMCkHIDxY0NDKG\nl6OocVXu9Yy1yP5fOE8mdgGNFzzJoy/2ZCSmJ+jCbu1b7oCpvq9C0HFlgiD/\ngRwO\r\n=3xHx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9/WmbJA79Jy5uXNe/j7wYnvPfeyoJBGfJ26VyWy+KNAiBp+rXbw1sD0p0GBumZzb6+BefoLIBu5TABNHM0GOo2xQ=="}]},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zlogger_2.0.0_1545208182857_0.6826562751227556"},"_hasShrinkwrap":false},"2.1.0":{"name":"zlogger","version":"2.1.0","description":"The last console logger","repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"dependencies":{"pumpify":"^1.5.1","split2":"^3.1.0","through2":"^3.0.0"},"devDependencies":{"@types/node":"^10.12.18","autod":"^3.0.1","coffee":"^5.1.1","egg-bin":"^4.9.0","egg-ci":"^1.11.0","eslint":"^5.10.0","eslint-config-egg":"^7.1.0","typescript":"^3.2.2"},"engines":{"node":">=8"},"ci":{"version":"8, 10"},"scripts":{"test":"npm run lint && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","gitHead":"56eef65508e5a341fcf03692cff9125d20fcbab4","bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"_id":"zlogger@2.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"dist":{"integrity":"sha512-32VTkIXOlJuW2C6Ut2o73ShJSSD9pWqNVsYoPsaK29m/mVneb7Ro/gzLAzU756WaKFF5mcXkq92ydIFNvxzYDQ==","shasum":"2a612cd335a519104600db8b55b0699b94c95820","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-2.1.0.tgz","fileCount":5,"unpackedSize":9579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcalXvCRA9TVsSAnZWagAA8e8QAIbOZzktZiST2YJsDxBy\nZ/TgxhPHWezgdK5IsRwrHnQ9OaqxYTNtJ3EjaCFxUzq1xI0biJKRlafZo0jX\nIKAc+azquz06gW00VU04UV2l1otrxD8812KQVynTBbm44a3vZbQfmjuf+XFg\nUA8dY/MX554FVDK9MM56CuKLsg9wtCib4Z8RBL9kajRiaaF3vSf+O9kKxEF+\nMBDjegpVxkDBEg/+hlLAW27/C8Z30WjrkAvNs70euKnWEi7sWZculn6WYwOc\nStaL4SmLS4zx1JzYje8izEWdxXGySkaTGwPvhLDSSUK9QYdJWq8t7ZzBHU1p\nKyKPQ51guSVsJQ0pUuNCN+I18dXSHRFVAm8Lx2xHje1Gk+9kRmFxciIAlt20\na2jC+y6dunDDd1ZeJ7YZzGlb7Qy91SaJzBscesaqNvULFfoeJF8yA916EdyB\nWGvD4w/NMI8tEYr/Q7ykUUAYw8q/EqyW88j6/Ega07zF2q1H8Zwc2GzGraD0\njMf0GFEwxQagpfMs9PcJEwogxDRPN2+RQD76AjtBjhHnuUkshnUaSM3SIZ6r\n2+qRbvdNpsu0o4t7WwWfCFkKxt+DOKZ2oRuGVUZj3z6nUT3hrH5kZXHEUfyz\nVRKzxgezC4Mqk8PNtZtg8pIsAL4ckJbMeuD7Z3qHzvY+iP8vsLn2g6J4GpPQ\nwx/X\r\n=YHgx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKiU1AZmWeep2XDzjJrNjlPUke1WjlUscrIvmNvlla9wIgXkB3d5r4Or5toM53giLVcWND3504qF+s5ss1Idkn4wo="}]},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zlogger_2.1.0_1550472686790_0.671608288141035"},"_hasShrinkwrap":false},"2.1.1":{"name":"zlogger","version":"2.1.1","description":"The last console logger","repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"dependencies":{"pumpify":"^1.5.1","split2":"^3.1.0","through2":"^3.0.0"},"devDependencies":{"@types/node":"^10.12.18","autod":"^3.0.1","coffee":"^5.1.1","egg-bin":"^4.9.0","egg-ci":"^1.11.0","eslint":"^5.10.0","eslint-config-egg":"^7.1.0","typescript":"^3.2.2"},"engines":{"node":">=8"},"ci":{"version":"8, 10"},"scripts":{"test":"npm run lint && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","lint":"eslint .","ci":"npm run lint && npm run cov","autod":"autod"},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"license":"MIT","types":"./index.d.ts","gitHead":"21c24a8885cb28bfa0988776b39527b4b8697edb","bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"_id":"zlogger@2.1.1","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-lsdQ2zRb64j7kdLqzeVmXRroD9nhHZxJX5Ha5lL/KWGcT/Lny04YA2wVO1YoNBVF/yR3R1z4Jayh3C1aI4BR+A==","shasum":"87db02bb845e5c27648007c6cad98418929c32e3","tarball":"https://registry.npmjs.org/zlogger/-/zlogger-2.1.1.tgz","fileCount":4,"unpackedSize":8994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFUfW7H8fD6LvL1L4HYm63l60lewo2duKudg5A5LXJxiAiEA+J0C0hI4P+vRtOA/nNibgeM8efhHb5prsKKQw7de4oQ="}]},"_npmUser":{"name":"popomore","email":"sakura9515@gmail.com"},"directories":{},"maintainers":[{"name":"popomore","email":"sakura9515@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zlogger_2.1.1_1692278931264_0.7852140681115012"},"_hasShrinkwrap":false}},"readme":"# zlogger\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/zlogger.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/zlogger\n[travis-image]: https://img.shields.io/travis/node-modules/zlogger.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/zlogger\n[codecov-image]: https://codecov.io/gh/node-modules/zlogger/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/node-modules/zlogger\n[david-image]: https://img.shields.io/david/node-modules/zlogger.svg?style=flat-square\n[david-url]: https://david-dm.org/node-modules/zlogger\n[snyk-image]: https://snyk.io/test/npm/zlogger/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/zlogger\n[download-image]: https://img.shields.io/npm/dm/zlogger.svg?style=flat-square\n[download-url]: https://npmjs.org/package/zlogger\n\nThe last console logger\n\n## Installation\n\n```bash\nnpm install --save zlogger\n```\n\n## Feature\n\n- ✔︎ Extends [Console](https://nodejs.org/api/console.html#console_new_console_stdout_stderr)\n- ✔︎ Support custom prefix before every line\n- ✔︎ Support custom stdout and stderr\n- ✔︎ Support print time\n- ✔︎ Support child logger\n- ✔︎ Support logger level\n\n## Usage\n\nzlogger is same as global `console` which has `.log`, `.info`, `.warn`, `.error`.\n\nEvery line will start with `prefix` that you customize.\n\n```js\nconst logger = new ConsoleLogger({\n  prefix: '> ',\n});\n```\n\nSupport log level: `DEBUG` / `INFO` / `WARN` / `ERROR`.\n\n```js\nconst logger = new ConsoleLogger({\n  prefix: '> ',\n  level: 'WARN',\n});\n\nlogger.error('msg_error');\nlogger.info('msg_info');\n\n// [15:03:46] prefix > msg_error\n```\n\nSpecify stdout/stderr, default is `process.stdout/process.stderr`, you can use `fs` if you want to print to file.\n\n```js\nconst logger = new ConsoleLogger({\n  stdout: fs.createWriteStream('stdout.log'),\n  stderr: fs.createWriteStream('stderr.log'),\n});\nlogger.info('info');\nlogger.error('error');\n\n// cat stdout.log\n// cat stderr.log\n```\n\nYou can create a child logger, the first argument can be a ChildProcess or writable stream. If you give a prefix, it will print after prefix defined by the parent logger.\n\n```js\nconst cp = require('child_process');\nconst logger = new ConsoleLogger({\n  prefix: 'prefix > ',\n});\nlogger.info('see directory')\n\nconst ls = cp.spawn('ls', { cwd: __dirname });\nlogger.child(ls, '> ');\n\n// [15:03:46] prefix > see directory\n// [15:03:46] prefix > > History.md\n// [15:03:46] prefix > > README.md\n// [15:03:46] prefix > > index.js\n// [15:03:46] prefix > > node_modules\n// [15:03:46] prefix > > package.json\n// [15:03:46] prefix > > test\n```\n\n`.child` will return a new logger.\n\n```js\nconst logger = new ConsoleLogger({\n  prefix: 'parent> ',\n});\nlogger.info('parent');\n\nconst child = logger.child('child> ');\nchild.info('child');\n\n// [15:02:43] parent> parent\n// [15:02:43] parent> child> child\n```\n\nIt will print time before prefix, format is `[HH:MM:SS] `, but you can disable it.\n\n## Options\n\n- {WriteStream} stdout - stdout, `.log` and `.info` will pipe to it，default is process.stdout\n- {WriteStream} stderr - stderr, `.warn` and `.error` will pipe to it，default is process.stderr\n- {String|Function} prefix - every line will start with `prefix`, if it's a function, it will be called every line print.\n- {Boolean} time - print time\n- {String|Number} level - log level\n\n## License\n\n(The MIT License)\n","maintainers":[{"email":"fengmk2@gmail.com","name":"fengmk2"},{"email":"sakura9515@gmail.com","name":"popomore"}],"time":{"modified":"2023-08-17T15:22:53.764Z","created":"2016-11-25T18:19:25.690Z","0.0.0":"2016-11-25T18:19:25.690Z","1.0.0":"2016-11-29T07:51:15.949Z","1.1.0":"2016-12-13T10:02:44.170Z","2.0.0":"2018-12-19T08:29:42.978Z","2.1.0":"2019-02-18T06:51:26.912Z","2.1.1":"2023-08-17T13:28:51.440Z"},"readmeFilename":"README.md","description":"The last console logger","homepage":"https://github.com/node-modules/zlogger","keywords":["logger","console","stream"],"repository":{"type":"git","url":"git+ssh://git@github.com/node-modules/zlogger.git"},"author":{"name":"popomore","email":"sakura9515@gmail.com"},"bugs":{"url":"https://github.com/node-modules/zlogger/issues"},"license":"MIT"}