{"_id":"debug-logger","_rev":"32-96bdc6f4bbdd20bacf9fe53b8fdc54a9","name":"debug-logger","description":"A wrapper for visionmedia/debug logger, adding levels and colored output","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"debug-logger","version":"0.1.0","description":"A wrapper for visionmedia's debug logger","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"2dc652571cf8a7eb0d62a51d912c5c221b4260b1","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.1.0","scripts":{},"_shasum":"1439f0f6b5c8d5d29f585b404697eaa08d7376cc","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"1439f0f6b5c8d5d29f585b404697eaa08d7376cc","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.1.0.tgz","integrity":"sha512-oThpA5SUMfrMKo46WBSSS2wIcNhc3IuCTGB8KKBDRMYjMBpBAOkhoWNW9dUoaDexk5xhxo1949liFPxUSrcWyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRCnSWDndJ1lB3MT/Sd7czEIUZ8x2j1AAdUSgYMtgaXwIgTbIglHDAB0GK972B9TMl0zIKFH1iI+EeaT4ULZpeC4o="}]},"directories":{}},"0.1.1":{"name":"debug-logger","version":"0.1.1","description":"A wrapper for visionmedia's debug logger","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"5b8af5d3ba89d266b20867d4c98ed22b6dea3fd3","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.1.1","scripts":{},"_shasum":"8cf16752d5d4139e1932469a448c1afdc1171480","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"8cf16752d5d4139e1932469a448c1afdc1171480","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.1.1.tgz","integrity":"sha512-WRqnhRjCTTqfWNns3jbSSztdwW3FIYPclHIli7xBISbUhutJCd1h2TmiT1YcewY0QYqy1PN/w9h5DTeYi1XRLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7t/ZqhWP7Wh248YKsU4EtCU84X0zZEmtepzYjj1c3TAiBC/0CR6dbYYxgxv5VGKZkVjkIcXX7BqKv56N8p5n5l/A=="}]},"directories":{}},"0.1.2":{"name":"debug-logger","version":"0.1.2","description":"A wrapper for visionmedia's debug logger","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"a37f6821c56440fae9b2487cf2e96965c8a9bbe6","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.1.2","scripts":{},"_shasum":"eff2478dd8159798744464154c3773313467dff4","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"eff2478dd8159798744464154c3773313467dff4","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.1.2.tgz","integrity":"sha512-EMWIRAo4FzZXp7tHy49WXuHMgboFUT6LcCicQppr9qAaveQCxnDVKEEejR88G2vM97aW9V3tehWPgjqyAAztvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKYqavE8PFu3uu6VYmQz4N0HxqMS8bqYre4nOHGtu1VAIgCwP1e1xbOWr9Gww3AXLh6jCz0TW/igWZJEY8gMxqycI="}]},"directories":{}},"0.1.3":{"name":"debug-logger","version":"0.1.3","description":"A wrapper for visionmedia's debug logger","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"4a0fb7163a6470a918cfa42c68bd2b6940d10614","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.1.3","scripts":{},"_shasum":"ba44f9e71b4ca9af86c5704839c770fbf4b417f7","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"ba44f9e71b4ca9af86c5704839c770fbf4b417f7","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.1.3.tgz","integrity":"sha512-quU+EbE40PXcd3kiV0HcPFNpiuGLuSNA0uoSmXhSnWWGudRW4T4z0KSGiFPe9K/lO0Mr7oSL2C7FTjsOdmTi8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaStRYc9oWkdPUkZDRKLy0TbphTpe4t+fpo+87cuvyewIhAOVsv6HnOUo/lIkmjjd319nP6/AhC3X82AYb0TLReZVU"}]},"directories":{}},"0.1.4":{"name":"debug-logger","version":"0.1.4","description":"A wrapper for visionmedia's debug logger","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"f7eb03d2189da27cb0bf4475e6d09a5f4052e0a7","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.1.4","scripts":{},"_shasum":"e7f266219a7200d0b3c00b2f9948813e6c3eb0e4","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"e7f266219a7200d0b3c00b2f9948813e6c3eb0e4","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.1.4.tgz","integrity":"sha512-B22W4YCwgAx+Up/ddyvE0RfJS/gsoTX/9RvkE3nxG35OS67axVZMLn2cBBTuV2+yw203PamKKMHZfsKb7c4uTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWB3cuYP7UdUGeRZwJnRsHr63YwCVZPAvszvSh7H3MpAiBgIc5eeMvsnS+OBZRIM+MaHQKVXXZ2+9GvVketrgwbUg=="}]},"directories":{}},"0.2.0":{"name":"debug-logger","version":"0.2.0","description":"A wrapper for visionmedia's debug logger, adding levels and colored output","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","levels","colors"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"~2.1.0"},"gitHead":"5cd707df3df5d45e13f4d135a5043044e3f4bdc5","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.2.0","scripts":{},"_shasum":"ad1cf239dc53a6e146b8c4b73672bdaca1ce27b9","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"ad1cf239dc53a6e146b8c4b73672bdaca1ce27b9","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.2.0.tgz","integrity":"sha512-3buTjI+ItTUFqcxctv9HnxBm1qqEELolJeQeFu+t4m/JD8qjh2CecXDD3sbut0ODbZFDx2AfziFRZejIoeBJOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDheoiITiSBlfufCcmjrIPz09FJICG267L/AxGtRMsaxwIhAL8t2iHqauXD+kYNkrneVRhCUKz1P/PosRlnT49DtG0F"}]},"directories":{}},"0.3.0":{"name":"debug-logger","version":"0.3.0","description":"A wrapper for visionmedia/debug logger, adding levels and colored output","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","levels","colors","colours","log","info","warn","error"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"^2.1.0"},"gitHead":"343d92143a83d10a7a97e127f6a8cad5afd3496e","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.3.0","scripts":{},"_shasum":"0aec562ba08aeb351c059c4fc5f7f1cc1414c3cc","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"0aec562ba08aeb351c059c4fc5f7f1cc1414c3cc","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.3.0.tgz","integrity":"sha512-VUZeJtbJZ19cRoNqmjfb5Wp03T3Y4FjyUIOBdYRjfekK33bXmkZBPzci8tVDGuIm3Una/NgOmVsoQXVrhkph0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEk3k3qRr1mx6AwbkBfCDWE0SpWsMw/XP/EK6Z1mHIUBAiEAx73fBz7lkcDlvUUakhNFzQFk41MBTlMRZjJUmeizlDE="}]},"directories":{}},"0.3.1":{"name":"debug-logger","version":"0.3.1","description":"A wrapper for visionmedia/debug logger, adding levels and colored output","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","levels","colors","colours","log","info","warn","error"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"^2.1.0"},"gitHead":"8228154830c9cc41168e1c4ecd930ed965bc8f32","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.3.1","scripts":{},"_shasum":"6bae529436bf1fb2c982674213a03c1f0b10c0d5","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"6bae529436bf1fb2c982674213a03c1f0b10c0d5","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.3.1.tgz","integrity":"sha512-2j0rkzWd1spFLCvMyNv6Fy3pEBCHxCpJj2pis9j0L6YQaT+y10yBPSpUbTfB2Laz3C5tFe3XV+5Z85YZlvopPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUWVPkX8XFGMnEq4W9UGcT6ih9AJy9AkCXDzjT7BINUgIhAM1IIU1BAfcA7qoTP2ba2XHoQ+rlD6PuFcg6K2O4/65e"}]},"directories":{}},"0.4.0":{"name":"debug-logger","version":"0.4.0","description":"A wrapper for visionmedia/debug logger, adding levels and colored output","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","levels","colors","colours","log","info","warn","error"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"^2.1.0"},"gitHead":"44e87e5954c08a2d0dff4a2eef839073771ad473","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.4.0","scripts":{},"_shasum":"df8ca2d59e04ce89fbcf5805afeda335734a70e4","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"df8ca2d59e04ce89fbcf5805afeda335734a70e4","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.4.0.tgz","integrity":"sha512-1o/1T2Z/9QialJPTJueP/36WcYybFRfvSIZkZJI6VAGxJDcGrEXt25Tvphn+yRMywRiUM7NapE5qPJ7LbE5sBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHaViQL08p6o/sV2KxfU9xnMmPEbvG1k53l13MXXdXX/AiBoVUaw6LYtUFGYFKjxP8v16pbKUL/ijGEQjSQRX/Zc5w=="}]},"directories":{}},"0.4.1":{"name":"debug-logger","version":"0.4.1","description":"A wrapper for visionmedia/debug logger, adding levels and colored output","main":"debug-logger.js","repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"keywords":["debug","logger","levels","colors","console","log","info","warn","error"],"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"license":"MIT","dependencies":{"debug":"^2.1.0"},"gitHead":"243988030d7102bdc945716687df61e30c157703","bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"homepage":"https://github.com/appscot/debug-logger","_id":"debug-logger@0.4.1","scripts":{},"_shasum":"e33849c369e3cd361b50b299d71ca5224baa1ae1","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.13","_npmUser":{"name":"appscot","email":"npm@appscot.com"},"maintainers":[{"name":"appscot","email":"npm@appscot.com"}],"dist":{"shasum":"e33849c369e3cd361b50b299d71ca5224baa1ae1","tarball":"https://registry.npmjs.org/debug-logger/-/debug-logger-0.4.1.tgz","integrity":"sha512-bLX6pxuWO6KMXBRk6vpLgHqWXiuLbKp8kLL/wNEA4rgU8wsNLaw3UNz0NfOi1bcN0JwjFwSfxhldzU5Bc6P5RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG+PCazDgM/A4tjS18HNVrfSad9uoOW35dCJ3Aaj0467AiEAvTLcynZs8z0Fg1kOxdJLPScaIiIPoTddqaVQOMhQf9Q="}]},"directories":{}}},"readme":"[![npm version](https://badge.fury.io/js/debug-logger.svg)](http://badge.fury.io/js/debug-logger)\n\ndebug-logger\n============\n\nA thin wrapper for visionmedia/debug logger, adding levels and colored output.\n\n## Overview\n[visionmedia/debug](https://github.com/visionmedia/debug) is a ubitiquous logging library with 1000+ dependants. Given how widespread it is and the convenience of namespaces it is a great logger for library modules.\n`debug-logger` is a convenience wrapper around `debug` that adds level based coloured output. Each instance of `debug-logger` will lazily instantiate several instances of `debug` such as `namespace:info`, `namespace:warn`, `namespace:error`, etc. All these are configurable. `debug-logger` has no dependencies besides `debug`.\n\n`debug-logger` uses the same syntax as [node.js console](https://nodejs.org/api/console.html) so you can use it as drop in replacement. \nCheck and run [examples/console.parity.js](https://github.com/appscot/debug-logger/blob/master/examples/console.parity.js) for more details.\n\nAt AppsCot we use `debug-logger` in [waterline-orientdb](https://github.com/appscot/waterline-orientdb).\n\n## Instalation\n```javascript\nnpm install debug-logger -S\n```\n\n## Usage\n```javascript\nvar log = require('debug-logger')('myapp');\n\nlog.trace(\"I'm a trace output\");\nlog.debug(\"I'm a debug output\");\nlog.log(\"I'm a log output\");\nlog.info(\"I'm an info output\");\nlog.warn(\"I'm a warn output\");\nlog.error(\"I'm an error output\");\n```\n![screenshot](https://raw.githubusercontent.com/wiki/appscot/debug-logger/ScreenShot.png)\n\n### Inspect error/object\n```javascript\nvar err = new Error('error message');\nerr.stack = 'the stack\\nline2\\nline3';\n\nlog.error('Something failed:', err);\n\nvar obj = {\n  anumber : 1234,\n  astring : 'str',\n  adate : new Date(),\n  aboolean : true\n};\nlog.info(\"let's inspect 'obj'\", obj);\n```\n![inspect error/object](https://raw.githubusercontent.com/wiki/appscot/debug-logger/error_object.png)\n\n### Original `debug` instances and enabled property\n```javascript\nlog.debug.logger()(\"the debug instance of debug, using 'myapp:debug' namespace\");\nvar debug = debugLogger.debug('myapp:visionmedia');\ndebug('Nothing tastes better than the original!');\n\nif (log.debug.enabled()) {\n  // This only runs if environment variable DEBUG includes \"myapp:debug\" namespace\n  log.debug(\"Debug is enabled\");\n}\n```\n![enabled](https://raw.githubusercontent.com/wiki/appscot/debug-logger/enabled.png)\n\n### util.inspect options\nFull `util.inspect` options available at [nodejs.org](http://nodejs.org/api/util.html#util_util_inspect_object_options).\n```javascript\nvar debugLogger = require('debug-logger');\ndebugLogger.inspectOptions = {\n  colors : true\n};\nlog.info('By enabling colors we get this nice colored example:', {\n  anumber : 1234,\n  astring : 'str',\n  adate : new Date(),\n  aboolean : true\n});\n```\n![inspect](https://raw.githubusercontent.com/wiki/appscot/debug-logger/inspect.png)\n\n### Customize available log levels\n```javascript\ndebugLogger.levels.error.color = debugLogger.colors.magenta;\ndebugLogger.levels.error.prefix = 'ERROR ';\n\nvar customColorLog = debugLogger('myapp');\ncustomColorLog.error(\"I'm a 'magenta' error output\");\n```\n![customize log](https://raw.githubusercontent.com/wiki/appscot/debug-logger/customize_log.png)\n\n### Add log levels\n```javascript\ndebugLogger.levels.silly = {\n  color : debugLogger.colors.magenta,\n  prefix : 'SILLY  ',\n  namespaceSuffix : ':silly'\n};\n\nvar sillyLog = debugLogger('myapp');\nsillyLog.silly(\"I'm a silly output\");\n```\n![add log levels](https://raw.githubusercontent.com/wiki/appscot/debug-logger/silly.png)\n\n### Multiple arguments / util.format style\n```javascript\nlog.log(\"Multiple\", \"arguments\", \"including\", \"objects:\", { obj: 'obj'}, \"makes life easier\");\nlog.warn(\"util.format style string: %s, number: %d and json: %j.\", \"foo\", 13, { obj: 'json'});\n```\n![multiple arguments](https://raw.githubusercontent.com/wiki/appscot/debug-logger/arguments.png)\n\n### Measure code execution time\n```javascript\nlog.time('100-elements');\nfor (var i = 0; i < 100; i++) {\n  ;\n}\nlog.timeEnd('100-elements');\n\nlog.time('setTimeout');\nsetTimeout(function(){\n  var diff = log.timeEnd('setTimeout', 'debug');\n  log.trace('log.timeEnd returns diff so it can be reused:', diff);\n}, 262);\n```\n![code time](https://raw.githubusercontent.com/wiki/appscot/debug-logger/time.png)\n\n### Inspect object\n```javascript\nlog.dir({ foo: { bar: 1 } });\nlog.dir({ foo: { bar: 1 } }, { depth: 0 }, 'warn');\n```\n![dir inspect](https://raw.githubusercontent.com/wiki/appscot/debug-logger/dir.png)\n\n### Assert condition\n```javascript\nlog.assert(1 == 0);\n\n// More elaborate example\nvar log = require('..').config({\n  levels: { \n    fatal: {\n      color : 5,  //magenta\n      prefix : '',\n      namespaceSuffix : ':fatal',\n      level : 6\n    }\n  }\n})('myapp');\nlog.assert(1 == 0, 'testing %s %d', 'log.assert', 666, 'fatal');\n```\n![assert](https://raw.githubusercontent.com/wiki/appscot/debug-logger/assert.png)\n\n### stderr vs stdout\nBy default trace, debug, log and info output to stdout while warn and error output to stderr.\nThis is configurable, [example](https://github.com/appscot/debug-logger/blob/master/examples/stdout_stderr.js):\n```javascript\nvar log = require('debug')('myapp');\nlog.trace(\"goes to stdout!\");\nlog.debug(\"goes to stdout!\");\nlog.log(\"goes to stdout!\");\nlog.info(\"goes to stdout!\");\nlog.warn(\"goes to stderr\");\nlog.error(\"goes to stderr\");\n\n// outputting only to stdout\nvar stdout = require('debug').config({ levels: { warn: { fd: 1 }, error: { fd: 1 } } })('stdoutapp');\nstdout.warn(\"goes to stdout!\");\nstdout.error(\"goes to stdout!\");\n```\n\n### Filter by log level (instead of namespace)\n```sh\nexport DEBUG_LEVEL=info\n```\nOnly info level and above logs will be outputted.\n\nMore examples in the [examples folder](https://github.com/appscot/debug-logger/blob/master/examples).\n\n## Reference\n\n### Instance Methods\n\nAssuming log is an instance of debug-logger (`var log = require('debug-logger')('myapp');`).\n\n#### `log.trace([data][, ...])`\n#### `log.debug([data][, ...])`\n#### `log.log([data][, ...])`\n#### `log.info([data][, ...])`\n#### `log.warn([data][, ...])`\n#### `log.error([data][, ...])`\nPrints the data prepended by log level. If the terminal supports colors, each level will have a specific color. If an Error is provided, the toString() and call stack will be outputted. If an Object is provided the toString() and util.inspect() will be outputted. Example:\n```\n  myapp:debug I'm a debug output +0ms\n  myapp:info  I'm an info output +1ms\n```\nThis function can take multiple arguments in a printf()-like way, if formatting elements are not found in the first string then util.inspect is used on each argument.\n\n#### `log([message][, ...])`\nOutputs the message using the root/default `debug` instance, without the level suffix. Example:\n```\n  myapp I'm a root/default debug instance output +0ms\n```\n\n#### `log[level].logger()`\nReturns the default `debug` instance used by `level`.\n\n#### `log[level].enabled()`\nBoolean indicating if `level`'s logger is enabled.\n\n#### `log.time(label)`\nMark a time.\n\n#### `log.timeEnd(label[, level])`\nFinish timer, record output. `level` will determine the logger used to output the result (defaults to 'log').\nReturn duration in ms.\n\n#### `log.dir(obj[, options][, level])`\nUses util.inspect on obj and prints resulting string to the appropriate logger. This function bypasses any custom inspect() function on obj. An optional [options object](https://nodejs.org/api/console.html#console_console_dir_obj_options) may be passed that alters certain aspects of the formatted string.\n`level` will determine the logger used to output the result (defaults to 'log').\n\n#### `log.assert(value[, message][, ...][, level])`\nSimilar to [console.assert()](https://nodejs.org/api/console.html#console_console_assert_value_message). \nAdditionally it outputs the error using the appropriate logger set by `level` (defaults to 'error').\n\n### Module\n\n#### `.config(obj)`\nConfigures debug-logger. Returns `debug-logger` to allow chaining operations.\n\n#### `.debug`\nReturns visionmedia/debug module.\n","maintainers":[{"name":"appscot","email":"npm@appscot.com"},{"name":"dmarcelino","email":"dario@appscot.com"}],"time":{"modified":"2022-06-14T22:08:06.910Z","created":"2014-12-22T17:27:24.243Z","0.1.0":"2014-12-22T17:27:24.243Z","0.1.1":"2014-12-22T19:28:06.816Z","0.1.2":"2014-12-22T19:55:38.617Z","0.1.3":"2014-12-23T11:07:13.256Z","0.1.4":"2014-12-26T19:14:35.424Z","0.2.0":"2015-01-04T18:21:40.670Z","0.3.0":"2015-02-26T01:30:54.671Z","0.3.1":"2015-02-26T17:31:52.584Z","0.4.0":"2015-03-11T14:51:02.759Z","0.4.1":"2015-03-13T16:47:09.259Z"},"homepage":"https://github.com/appscot/debug-logger","keywords":["debug","logger","levels","colors","console","log","info","warn","error"],"repository":{"type":"git","url":"git@github.com:appscot/debug-logger.git"},"author":{"name":"Dario Marcelino","email":"dario@appscot.com"},"bugs":{"url":"https://github.com/appscot/debug-logger/issues"},"license":"MIT","readmeFilename":"README.md","users":{"appscot":true,"therebelrobot":true,"maxbbn":true,"domjtalbot":true,"laggingreflex":true,"icodeforcookies":true,"temasm":true}}