micro-debug

1.1.0 • Public • Published

micro-debug

console.error wrapper that replicates debug output.

Install

$ npm install debug -S

Usage

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 203ms

Options

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)

Readme

Keywords

Package Sidebar

Install

npm i micro-debug

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mklabs