Node Debug Tool
Tiny node.js debugging tool with colors and timing functionality
Table of contents
Installation
$ npm install node-debug-tool
Usage
The DEBUG_MODE
environment variable, must be set to 1 in order to see the deubbing information.
Code example:
var worker1 = require('../lib/node-debug-tool')('worker 1');
var worker2 = require('../lib/node-debug-tool')('worker 2');
worker1.error('Some Error');
worker1.warning('Some warning');
worker1.log('Some logging');
worker2.error('Foo');
worker2.warning('Bar');
worker2.log('Foo bar');
setInterval(function () {
worker2.log('Some Foo Bar Log');
}, 2000);
Usage & Output: