{"name":"bower-logger","version":"0.2.0","description":"The logger used in the various architecture components of Bower.","author":{"name":"Twitter"},"licenses":[{"type":"MIT","url":"https://github.com/bower/logger/blob/master/LICENSE"}],"repository":{"type":"git","url":"git://github.com/bower/logger.git"},"main":"lib/Logger","engines":{"node":">=0.8.0"},"devDependencies":{"expect.js":"~0.2.0","mocha":"~1.12.0"},"scripts":{"test":"mocha -R spec"},"bugs":{"url":"https://github.com/bower/logger/issues"},"_id":"bower-logger@0.2.0","dist":{"shasum":"c70705790c70985f4b34805d1f8bb63821a37656","tarball":"http://registry-npm.ywwl.com/bower-logger/download/bower-logger-0.2.0.tgz","integrity":"sha512-pGTigsFHg4K+lOoQ2hrBH5Q3FzVgXmMIWsRfIWF4rMbYYTyEYXGxuv1wMVjh9QGE2e5lbrsyLZzAOhZIQi5Saw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDtD3AxKwD78FbE6NtDc09enTmQ+MVNwoE70kHQzJVYAiEAutUw8OH07Khbr3uCpZyLnjv9z9cFD5ZA5+PXKns2BOw="}],"size":5009,"noattachment":false,"key":"/bower-logger/-/bower-logger-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"satazor","email":"andremiguelcruz@msn.com"},"maintainers":[{"name":"satazor","email":"andremiguelcruz@msn.com"}],"directories":{},"readme":"# bower-logger [![Build Status](https://secure.travis-ci.org/bower/logger.png?branch=master)](http://travis-ci.org/bower/logger)\n\nThe logger used in the various architecture components of Bower.\n\n\n## Usage\n\n### .error(id, message, data)\n\nAlias to `.log('error', id. message, data)`\n\n\n### .conflict(id, message, data)\n\nAlias to `.log('conflict', id. message, data)`\n\n\n### .warn(id, message, data)\n\nAlias to `.log('warn', id. message, data)`\n\n\n### .action(id, message, data)\n\nAlias to `.log('action', id. message, data)`\n\n\n### .info(id, message, data)\n\nAlias to `.log('info', id. message, data)`\n\n\n### .debug(id, message, data)\n\nAlias to `.log('debug', id. message, data)`\n\n\n### .log(level, id, message, data)\n\nEmits a `log` event, with an object like so:\n\n```js\nlogger.log('warn', 'foo', 'bar', { dog: 'loves cat' })\n{\n    level: 'warn',\n    id: 'foo',\n    message: 'bar',\n    data: {\n        dog: 'loves cat'\n    }\n}\n```\n\n\n### .prompt(prompts, callback)\n\nEmits a `prompt` event with an array of `prompts` with a `callback`.   \n`prompts` can be an object or an array of objects. The `callback` will be called with an\nthe answer or an object of answers (if prompts was only one or an array respectively).\nThe `callback` is guaranteed to run only once.\n\n```js\nlogger.on('prompt', function (prompts, callback) {\n    // \"prompts\" is always an array of prompts\n    // Call \"callback\" with an object of answers when done\n\n    // In this example, we will use the inquirer module to do the\n    // prompting for us\n    inquirer(prompts, callback);\n})\n\nlogger.prompt({\n    type: 'input'  // Can be 'input', 'confirm' or 'password'\n    message: 'Type something',\n    validate: function (value) {\n        if (value !== 'I am awesome') {\n            return 'You must type \"I am awesome\"'\n        }\n\n        return true;\n    }\n}, function (err, answer) {\n    // Error will only happen on unsupported 'type'\n    if (err) {\n        return console.error(err.message);\n    }\n\n    console.log(answer);\n});\n\n\n```\n\n\n### .pipe(logger)\n\nPipes all logger events to another logger.   \nBasically all events emitted with `.emit()` will get piped.\n\n\n### .geminate()\n\nCreates a new logger that pipes events to the parent logger.   \nAlias for `(new Logger()).pipe(logger)`.\n\n\n### .intercept(fn)\n\nIntercepts `log` events, calling `fn` before listeners of the instance.\n\n\n### #LEVELS\n\nA static property that contains an object where keys are the recognized log levels and values their importance.   \nThe higher the importance, the more important the level is.\n\n\n## License\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n","publish_time":1376869476225,"_cnpm_publish_time":1376869476225,"dist-tags":{"latest":"0.2.2"}}