{"name":"glogg","version":"1.0.2","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":">= 0.10"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"sparkles":"^1.0.0"},"devDependencies":{"eslint":"^2.13.0","eslint-config-gulp":"^3.0.1","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","mocha":"^3.5.3"},"keywords":["global","log","logger","logging","shared"],"gitHead":"6e0fdff7642ec485e14abc6d142580bcc493d6ed","bugs":{"url":"https://github.com/gulpjs/glogg/issues"},"homepage":"https://github.com/gulpjs/glogg#readme","_id":"glogg@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"dist":{"integrity":"sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==","shasum":"2d7dd702beda22eb3bffadf880696da6d846313f","tarball":"http://registry-npm.ywwl.com/glogg/download/glogg-1.0.2.tgz","fileCount":4,"unpackedSize":6090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDsqxCRA9TVsSAnZWagAAmH0P/3tyVs4/xPsnU30Cc4Fu\n7BGvkqDA0GSHuKNFa9NBY2/tP0Tezr3bTLTU4MLeFB3xe1k6XZ7AJS7h+RbL\ndeqGU4kl9XdXFXzDDVZT961PDAR6voNPOa4IUlibeOkcdLOUNVMSE+gXuS7y\nfwk/zbNB91P6Ui0bzTmZHI8yeyO05tk9DYsgIVhEwCZrY8Z5UIiebybuO17p\nkzOCji/qNkaIJ9WSg6TPdsjkzBvI5J7zNF/vXCxfn4EkS21Nc1Vgnsgk22Vz\nKaLl+fpjjzm842w2eA3doPRHEMIfoGIpU0Gay7+CZPZJNOIQT/hiMSe+Zv7Y\nRvpupWqaqtflEZJSjPwhZ6WmLrm16THp0if1x3nhvZr17b5BgQoHc4NH7XhC\nzxgdeNL3tQS5LImBUhpKGQwz3EVu0N3I/hs48hleK0Mu91PM6CdaGllpQrUm\nRCJCSpFwogjZKY1q87xAe594pje9i0MPaF5trvbj3UnaoipjF9+B/edd/JXo\ndpL0YyZVGgTFsuloTdpr97oAqf8ei7N5wBpAYeH39QYrxgAKOgEk7iikXTrE\nUxgzXEcKsdxyu+Pq/GLxUfLQOa6Of8yivL5MUu+jMx4a0r/5eQYBEPyH7z9P\ncZKiv+yr+ekqjxfHCa/Bg3UaSEzHMPVfr/F9uRhEaJ/N5IO2cfsi+LjDsJ5j\nxZlW\r\n=3fFO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2HA4Psg1aSyF+CesdDoCh2UKs7YQD03PaNE6XbqH5ZgIhAKUn66nhnZfzo1J43rPQHbsSNUEpbnuerGAWtCQ47KwG"}],"size":2825,"noattachment":false,"key":"/glogg/-/glogg-1.0.2.tgz"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glogg_1.0.2_1544473264804_0.8854767146691764"},"_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":1544473264943,"_cnpm_publish_time":1544473264943,"dist-tags":{"latest":"2.2.0"}}