0.4.0 • Published 10 years ago

better-debug v0.4.0

Weekly downloads
41
License
LGPL-3.0
Repository
github
Last release
10 years ago

Better Debug

Circle CI npm npm Codacy Codecov VersionEye

A better alternative to debug module.

Installation

With npm...

npm install --save better-debug

Usage

var debug = require('better-debug')('main');

debug.log('Test'); // app:main:log Test
debug.info('Test %d', 0); // app:main:info Test 0
debug.warn(new Error('Test')); // app:main:warn { [Error: Test] }
debug.error(new Error('Test'), { method: 'testMethod', 'location': 'index.js', }); // app:main:error { [Error: Test] method: 'testMethod', location: 'index.js' }

You can filter everything with the env variable DEBUG. For example, DEBUG=app:*:info node . will only output debug.info calls.

0.4.0

10 years ago

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago