getdebug
Returns a visionmedia/debug instance with the namespace set to a prefixed application name. The path to the javascript file gets relatively namespaced based on the absolute path and the given namespace in the actual node module
Installation
$ npm install getdebug
Usage
// myapp/index.jsvar getDebug = processenvAPP_NAME __dirname; // e.g. set with express as a "global" settingapp; // in myapp/lib/controllers/foo.jsvar getDebug = app;var debug = ;
This is what you will see:
$ APP_NAME=example DEBUG=example* node myapp/index.js
example(27720):lib:controllers:foo Hello from here +1ms
License
MIT