{"name":"glogg","version":"2.0.0","description":"Global logging utility","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/glogg.git"},"license":"MIT","engines":{"node":">= 10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{"sparkles":"^2.0.0"},"devDependencies":{"eslint":"^7.32.0","eslint-config-gulp":"^5.0.1","eslint-plugin-node":"^11.1.0","expect":"^27.4.6","mocha":"^8.4.0","nyc":"^15.1.0"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["global","log","logger","logging","shared"],"gitHead":"ad09a43a26cb4b5b88112d61fd86aca6682729c9","bugs":{"url":"https://github.com/gulpjs/glogg/issues"},"homepage":"https://github.com/gulpjs/glogg#readme","_id":"glogg@2.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.11.0","dist":{"integrity":"sha512-YDtL/QX54MN8+GorvS9tnKI5HtqWrFW9bv5yPRmFBeofi5neWzqQN8X/0HmM5zMkDbB8OYvC3/Pj8UEJUZFeqA==","shasum":"5b69c867f8b02a503b0653ed80c37ceba0a69361","tarball":"http://registry-npm.ywwl.com/glogg/download/glogg-2.0.0.tgz","fileCount":4,"unpackedSize":5888,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBlDruoGiKeKBcdW5yLNKufwWdEghLjfmdfU6nfQiPEiAiBUqZYqd3qdJ+4KMzKFMcwM4ChGnSS5U5mqiBmdjIknHA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiti84ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIAw//SKiStUVCb6V8bEzRL25BlJ1yRaMM+GmtcjfeRE1kUxAAw/wS\r\nMgwcbnc2PeZmjBYXcVw1iOFu9S5hQk4+1jmdeX52z9h1Bw/v/y+egg5DsoH0\r\nLm/siK9jKnxXJNS6zWsoMCcv6Gvqp00ZNyO83svUd+8//XIQFj73lSr4F82c\r\n8dmKOByK/rwdoSHU7Ha/zIornLipshQB0Ajsh6QEi6KMJL2bZurQ3zGHjoW5\r\niYJyIHBMdIBjyxelhaLAD3vhayRsBCGjv+Q/xEVC8eo6tS5/SeNFIzPore25\r\nnTdrUjmjq1hA5G5RDq5m8HCMdXdAcFFmUDtO9009iNRi76Cv6gg94EMhh9/m\r\nVjRNJ+sGQAMybDDPGBCLY4zBwzSHmX6X3Q9hs+S6BvWE80FJ93D7Ao2EDqQM\r\n0yRgWjcHhRdAD99enftUtdYQsFf5dnnMM7i6XRChJ1avJecDTQ+rj53fw0qZ\r\nuvt5sZBZfUsJc0orp04CkybA0VwlrBIKY6J3nd8jOT47Ck6wV39fgRHWoGJi\r\n8/5S3PWHBXKnuh764rp+5ik8WfE7tzq8A+xvJE8/f5VvRhFEBgk/nm4ESPSU\r\nfneJbi4lNgP/ZhRyWFTrh8h9feugb8JAiXzi6j8b7QdAMENi8/R64ojd05QN\r\n9iz5a1rN3t6ALV7cSEG8cUxGJNzY0MrqiT4=\r\n=2ngE\r\n-----END PGP SIGNATURE-----\r\n","size":2758,"noattachment":false,"key":"/glogg/-/glogg-2.0.0.tgz"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"sttk","email":"sttk.xslet@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glogg_2.0.0_1656106808001_0.1281717288443649"},"_hasShrinkwrap":false,"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# glogg\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nGlobal logging utility.\n\n## Usage\n\n```js\nvar getLogger = require('glogg');\n\nvar logger = getLogger('my-namespace');\n\n// logs strings\nlogger.debug('The MOST verbose!');\nlogger.info('Some important info');\nlogger.warn('All the warnings to you');\nlogger.error('OH NO! SOMETHING HAPPENED!');\n\n// supports util.format!\nlogger.info('%s style!', 'printf');\n\n// log anything\nlogger.debug({ my: 'obj' });\nlogger.info([1, 2, 3]);\n\n// somewhere else\nlogger.on('info', function (msg) {\n  // do something with msg\n});\n\n// must be handled to avoid crashing process\nlogger.on('error', function (msg) {\n  // now it won't crash\n});\n```\n\n## API\n\n**Note: This module makes no assumptions about the log levels and they will always\nbe emitted. If you are looking to filter some out, your listeners will need to have\nextra logic.**\n\n### getLogger([namespace])\n\nCreate a new logger at the given namespace (or the default if no namespace is provided).\nReturns an augmented [`sparkles`](https://github.com/phated/sparkles) EventEmitter object\nwith 4 methods: `debug()`, `info()`, `warn()` and `error()`. When called, these methods emit\nan event with the same name. If the first argument is a string, the arguments\nare passed through node's `util.format()` before being emitted. Other parts\nof a node program can get the logger by namespace and listen for the events to\nbe emitted.\n\n#### logger.debug(msg, ...args)\n\nEmits a `debug` event with the given `msg`.\n\nIf the first argument is a string, all arguments are passed to node's\n`util.format()` before being emitted.\n\nIf the first argument is not a string, all arguments will be emitted directly.\n\n#### logger.info(msg, ...args)\n\nEmits a `info` event with the given `msg`.\n\nIf the first argument is a string, all arguments are passed to node's\n`util.format()` before being emitted.\n\nIf the first argument is not a string, all arguments will be emitted directly.\n\n#### logger.warn(msg, ...args)\n\nEmits a `warn` event with the given `msg`.\n\nIf the first argument is a string, all arguments are passed to node's\n`util.format()` before being emitted.\n\nIf the first argument is not a string, all arguments will be emitted directly.\n\n#### logger.error(msg, ...args)\n\nEmits a `error` event with the given `msg`.\n\nIf the first argument is a string, all arguments are passed to node's\n`util.format()` before being emitted.\n\nIf the first argument is not a string, all arguments will be emitted directly.\n\n**Note: You must handle this event in some way or the node process will crash\nwhen an `error` event is emitted.**\n\n#### logger.on(event, fn)\n\nStandard API from node's `EventEmitter`. Use this to listen for events from\nthe logger methods.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/glogg.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/glogg\n[npm-image]: https://img.shields.io/npm/v/glogg.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/glogg/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/glogg/dev.yml?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/glogg\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glogg/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","publish_time":1656106808199,"_cnpm_publish_time":1656106808199,"dist-tags":{"latest":"2.2.0"}}