{"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"keywords":["global","log","logger","logging","shared"],"dist-tags":{"latest":"1.0.0"},"author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com/"},"description":"Global logging utility","readme":"# glogg\n\n[![Travis Build Status](https://img.shields.io/travis/undertakerjs/glogg/master.svg?label=travis&style=flat-square)](https://travis-ci.org/undertakerjs/glogg)\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)\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\n#### logger.info(msg)\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\n#### logger.warn(msg)\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\n#### logger.error(msg)\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\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","repository":{"type":"git","url":"git+https://github.com/undertakerjs/glogg.git"},"users":{"antixrist":true},"bugs":{"url":"https://github.com/undertakerjs/glogg/issues"},"license":"MIT","versions":{"0.0.0":{"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://nexus.dui88.com:8081/nexus/content/groups/npm-all/glogg/-/glogg-0.0.0.tgz"},"directories":{}},"1.0.0":{"name":"glogg","version":"1.0.0","description":"Global logging utility","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com/"},"contributors":[],"repository":{"type":"git","url":"git+https://github.com/undertakerjs/glogg.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL --globals store@sparkles"},"dependencies":{"sparkles":"^1.0.0"},"devDependencies":{"@phated/eslint-config-iceddev":"^0.2.1","code":"^1.5.0","eslint":"^1.3.1","eslint-plugin-mocha":"^0.5.1","eslint-plugin-react":"^3.3.2","lab":"^5.16.0"},"keywords":["global","log","logger","logging","shared"],"gitHead":"2683314c5bb5473e0d492418974b111f366168db","bugs":{"url":"https://github.com/undertakerjs/glogg/issues"},"homepage":"https://github.com/undertakerjs/glogg#readme","_id":"glogg@1.0.0","_shasum":"7fe0f199f57ac906cf512feead8f90ee4a284fc5","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.36","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"7fe0f199f57ac906cf512feead8f90ee4a284fc5","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/glogg/-/glogg-1.0.0.tgz"},"directories":{}}},"name":"glogg","contributors":[],"time":{"modified":"2017-03-02T13:27:57.422Z","created":"2014-12-29T01:41:29.255Z","0.0.0":"2014-12-29T01:41:29.255Z","1.0.0":"2015-09-11T01:19:50.649Z"},"readmeFilename":"README.md","homepage":"https://github.com/undertakerjs/glogg#readme"}