i-log
v1.1.5
Published
debug module extensions
Downloads
7
Maintainers
Readme
i-log
Share logger between nodejs modules. Use a dedicate key for each module and filter the module you want is writing.
Install
$ npm install --save i-log
Configuration
setting DEBUG variable when run your modules
# print all keys
DEBUG=i_log:* npm start
# print info keys
DEBUG=i_log:info npm start
Usage
var i_log = require('i_log')("your_module")
i_log.info("test info")
i_log.debug("test debug")
i_log.error("test error")
Output
your_module:info Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test info +0ms
your_module:debug Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test debug +117ms
your_module:error Wed Oct 19 2016 16:53:03 GMT+0200 (CEST) test error +117ms