1.1.0 • Published 9 years ago
micro-debug v1.1.0
micro-debug
console.error wrapper that replicates debug output.
Install
$ npm install debug -SUsage
const debug = require('micro-debug')('test:install');
debug('Define %s suite', 'foo');
setTimeout(() => {
debug('done');
}, 200);Output
test:install Define foo suite 0ms
test:install done 203msOptions
Configuration is done via environment variables:
DEBUG_PREFIX- default namespace when not provided (require('micro-debug')())DEBUG_STREAM- output stream. If it is a String, will attempt to open a new WriteStream and use it to redirect log output (default:process.stderr)