enable-debug
v1.0.1
Published
Enable debug logs via query-string
Downloads
28
Readme
enable-debug
Enable debug logs via query-string.
Install
With npm do:
$ npm install enable-debug
API
enableDebug(ids, disableFirst)
ids
:Array
List of debug ids that are enabled without query string.
Same asdebug.enable('id')
.disableFirst
:Boolean
Calldebug.disable()
before enabling debug.
Usage
var enableDebug = require('enable-debug');
enableDebug(['foo', 'bar'], true);
var debug = require('debug');
debug('foo')('yes');
debug('bar')('yes');
debug('baz')('no');
// enables via url
debug('url')('yes');
debug('route')('yes');
// ?debug=url,route
// >> debug: foo, bar, url, route
License
MIT