UNPKG

i-log

Version:
6 lines 1.02 kB
{ "name": "I-log", "tagline": "share logger between nodejs modules", "body": "# i-log\r\n\r\nShare logger between nodejs modules.\r\nUse a dedicate key for each module and filter the module you want is writing.\r\n## Install\r\n\r\n```sh\r\n$ npm install --save i-log\r\n```\r\n## Configuration\r\nsetting DEBUG variable when run your modules \r\n```sh\r\n# print all keys\r\nDEBUG=i_log:* npm start\r\n```\r\n```sh\r\n# print info keys\r\nDEBUG=i_log:info npm start\r\n```\r\n## Usage\r\n\r\n```sh\r\nvar i_log = require('i_log')(\"your_module\")\r\ni_log.info(\"test info\")\r\ni_log.debug(\"test debug\")\r\ni_log.error(\"test error\")\r\n```\r\n\r\n## Output\r\n```sh\r\nyour_module:info Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test info +0ms\r\nyour_module:debug Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test debug +117ms\r\nyour_module:error Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test error +117ms\r\n```\r\n\r\n\r\n", "note": "Don't delete this file! It's used internally to help with page regeneration." }