i-log

1.1.5 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.5
    2
    • latest
  • 1.1.4
    1
    • beta

Version History

Package Sidebar

Install

npm i i-log

Weekly Downloads

5

Version

1.1.5

License

none

Last publish

Collaborators

  • alessandro.donateo