simple-debug
Simple tool to limit log output. It's configuration is compatible with visionmedia/debug.
Examples
Basic
var debug = 'mything'; ;
The DEBUG
environment variable used to enable logging. Give it space- or comma-separated names.
$ DEBUG=mything node myappdoing something usefuldoing something usefuldoing something useful
Multiple
var debug = ;debugworking = ;debugwaiting = ; ;
Turn on only the waiting
log.
$ DEBUG=waiting node myapppausing for 1spausing for 1s
Turn on both.
$ DEBUG=waiting,working node myappdoing something usefulpausing for 1sdoing something usefulpausing for 1s
Output Stream
Send output through console.err
instead of console.log
.
var debug = 'mything';debuglog = consoleerror; ;
License
MIT. The core functions were extracted from debug. See LICENSE for details.