{"_id":"underscore.logger","_rev":"7-152ec3fe3f82a56d8399f70034422b90","name":"underscore.logger","description":"Cross-browser and Node.js empowered logging.  Use as Underscore.js mixin if desired.","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.0":{"name":"underscore.logger","version":"0.3.0","description":"Cross-browser and Node.js empowered logging.  Use as Underscore.js mixin if desired.","homepage":"http://github.com/viatropos/underscore.logger.js","main":"lib/underscore.logger.js","author":{"name":"Lance Pollard","email":"lancejpollard@gmail.com"},"keywords":["logging","node","browser"],"licenses":[{"type":"MIT","url":"http://mths.be/mit"}],"bugs":{"url":"https://github.com/viatropos/underscore.logger.js/issues"},"repository":{"type":"git","url":"git://github.com/viatropos/underscore.logger.js.git"},"directories":{"test":"spec"},"_npmUser":{"name":"viatropos","email":"lancejpollard@gmail.com"},"_id":"underscore.logger@0.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"726bc26e0034eeb354720c5c609f6e0d537bc5e0","tarball":"https://registry.npmjs.org/underscore.logger/-/underscore.logger-0.3.0.tgz","integrity":"sha512-HGkrFPefRrhv5ge3BGBsfn8ylTrInFPRHDPpFe0kyYTZaYyznPAkt0QjjKoyfKr7R6Y7IU0+6Sjb6XLbm+5q4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClCFj3NcsYheyhoaLjyVQ3ORDSbtg16vjWI8OJzYERHAiEA81b6mpEDx5pcvQaQtGdgRcEMOAvMoV782KQzhw9kAUE="}]},"maintainers":[{"name":"viatropos","email":"lancejpollard@gmail.com"}]},"0.3.1":{"name":"underscore.logger","version":"0.3.1","description":"Cross-browser and Node.js empowered logging.  Use as Underscore.js mixin if desired.","homepage":"http://github.com/viatropos/underscore.logger.js","main":"lib/underscore.logger.js","author":{"name":"Lance Pollard","email":"lancejpollard@gmail.com"},"keywords":["logging","node","browser"],"licenses":[{"type":"MIT","url":"http://mths.be/mit"}],"bugs":{"url":"https://github.com/viatropos/underscore.logger.js/issues"},"repository":{"type":"git","url":"git://github.com/viatropos/underscore.logger.js.git"},"directories":{"test":"spec"},"_npmUser":{"name":"viatropos","email":"lancejpollard@gmail.com"},"_id":"underscore.logger@0.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"f61a09f2ef43fe81797731245418c75767eed38e","tarball":"https://registry.npmjs.org/underscore.logger/-/underscore.logger-0.3.1.tgz","integrity":"sha512-ZlAmLnzC29YA2hNHG2Fhfg7SlXCEN/t4XebiagGqy9oVX7Oh73+7Zp/yqEfemON/LNqUmLB1xYikdLtJXE15eQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrDwXqu/cv7SDqxMS+rKE5GYHiYN/TBkDS5eWlrUjQNAIhAM8X3OvZB59Vrssbf/AXdOsNCSQi8nROKYwr+tgNjtt6"}]},"maintainers":[{"name":"viatropos","email":"lancejpollard@gmail.com"}]}},"readme":"# CommonLogger.js\n\n> Cross-browser and Node.js empowered logging.\n\n## Install\n\n```\nnpm install underscore.logger\n```\n\n## Require\n\n### Node.js\n\n``` coffeescript\n_console = require('underscore.logger')\n```\n\nIf you want to make it useable everywhere in node:\n\n``` coffeescript\nglobal._console ||= require('underscore.logger')\n```\n\nOr to make it an underscore mixin:\n\n``` coffeescript\n_.mixin require('underscore.logger').toMixin()\n```\n\n### Browser\n\n``` html\n<script src=\"/javascripts/common-logger.js\" type=\"text/javascript\"></script>\n```\n\n## Api\n\n``` coffeescript\n# set the log level so anything above this won't show up\n_console.level  = CommonLogger.DEBUG\n\n# override default colors for any of the log levels\n_console.colors[CommonLogger.WARN] = CommonLogger.ANSI.RED\n\n# the first parameter is the message, any following parameters are variables.\n_console.trace  \"I'm a trace\"\n_console.debug  \"Debug message\"\n_console.info   \"%s %s!\", \"Hello\", \"World\" #=> \"Hello World!\"\n_console.error  \"ERROR!\"\n_console.fatal  \"oh man...\"\n\n# set a custom `out` method, which defaults to `console.log`\n_console.out    = (message) -> alert(message)\n\n# customize the format too if you'd like, which defaults to `[date] level message`\n_console.format = (date, level, message) -> message\n\n# watch the fps to see how your app is performing (`this` is the `CommonLogger.Timer` object)\n_console.on \"frame\" ->\n  $(\"#log-line-template\").tmpl(@fps).appendTo(\"#log-panel\")\n```\n\nTo create a new one, maybe because you want two separate loggers (the edge case), you can use the constructor:\n\n``` coffeescript\nmyLogger = new _console.constructor\n```\n\n## Resources\n\n- http://en.wikipedia.org/wiki/Common_Log_Format\n\n## Development\n\n```\n./node_modules/coffee-script/bin/coffee -o lib -w src\n./node_modules/jasmine-node/bin/jasmine-node --coffee ./spec\n```\n\n## License\n\n(The MIT License)\n\nCopyright &copy; 2011 [Lance Pollard](http://twitter.com/viatropos) &lt;lancejpollard@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"viatropos","email":"lancejpollard@gmail.com"}],"time":{"modified":"2022-06-28T04:08:39.117Z","created":"2011-11-15T01:41:37.751Z","0.3.0":"2011-11-15T01:41:39.180Z","0.3.1":"2011-11-16T01:10:51.443Z"},"author":{"name":"Lance Pollard","email":"lancejpollard@gmail.com"},"repository":{"type":"git","url":"git://github.com/viatropos/underscore.logger.js.git"}}