{"name":"glogg","version":"0.0.0","description":"Global logging utility","main":"index.js","scripts":{"test":"lab -cv"},"repository":{"type":"git","url":"https://github.com/phated/glogg"},"keywords":["global","log","logging","logger","shared"],"author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com/"},"license":"MIT","bugs":{"url":"https://github.com/phated/glogg/issues"},"homepage":"https://github.com/phated/glogg","dependencies":{"sparkles":"git://github.com/phated/sparkles"},"devDependencies":{"code":"^1.2.1","lab":"^5.1.1"},"gitHead":"5e61145d350457e74fbf2dd1a134257e391c968a","_id":"glogg@0.0.0","_shasum":"5be6efd4f8dddfcac5f5e6605069734b65a68337","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.35","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"5be6efd4f8dddfcac5f5e6605069734b65a68337","tarball":"http://registry-npm.ywwl.com/glogg/download/glogg-0.0.0.tgz","integrity":"sha512-DvQ45YftEQR3jxBsLzbLmqo7r5R+4yCQUlIRUjc+Dvo5YFlo21EfUtlZveLOYxxIn2sPGefpd5sGyVcuj5W3xA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsZVBOloRjRteqGC/S6qSnEGE3JtpvxPy2BfcQXI9H4AIhAOtPyjh1qcLVGxtiDreMtqRt7csz7auVxL56OwkSN+r/"}],"size":1797,"noattachment":false,"key":"/glogg/-/glogg-0.0.0.tgz"},"directories":{},"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":1419817289255,"_cnpm_publish_time":1419817289255,"dist-tags":{"latest":"2.2.0"}}