788 B
788 B
debug-fabulous
Install
npm install --save debug-fabulous
Purpose
Wrapper / Extension around visionmedia's debug to allow lazy evaluation of debugging via closure handling.
This library essentially wraps two things:
- lazy-debug for easy namespace naming by files
- lazy-eval debug closure handling
Use
For thorough usage see the tests.
lazy-eval
var debug = require('')();
// force namespace to be enabled otherwise it assumes process.env.DEBUG is setup
// debug.save('myNamespace');
// debug.enable(debug.load())
debug = debug('debug-fabulous');
debug(function(){return 'ya something to log' + someLargeHarryString;});
debug('small out');