Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

debug-dude

A thin wrapper around visionmedia`s debug

It exposes a factory having same signature as visionmedia`s debug, but returns an object with several logger instances.

How to use (es6)

// file: example_dude.jsimportdudefrom'debug-dude';const{ debug, log, info, warn, error }=dude('my:space');log('hello!');warn('beware of wolfs');error('you shall not pass, dude!');

Console output

# log all
✗ DEBUG=* babel-node example_dude.js
my:space:log hello! +0ms
my:space:warn beware of wolfs +3ms
my:space:error you shall not pass, dude! +2ms
# log only errors
✗ DEBUG=*error babel-node __test_dude.js
my:space:error you shall not pass, dude! +0ms
# log all but errors 
✗ DEBUG=my:*,-*error babel-node __test_dude.js
my:space:log hello! +0ms
my:space:warn beware of wolfs +2ms

About

Thin wrapper around visionmedia`s debug

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages