0.0.4 • Published 10 years ago

debug-me v0.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
10 years ago

debug-me

Let the location you call it from decide what the debug label should be!

Installation

npm install debug-me

Usage

For the projected called hello-there in its package.json, doing the following in a file called lib/foo/bar/baz.js:

var debug = require('debug-me');

debug("I'm a little teapot", {
  short: true,
  stout: true
});

Produces this output:

hello-there:foo:bar:baz I'm a little teapot +0ms { short: true, stout: true }

Basically, it will take the calling file's path and name (minus lib or src if present) and turn that into the debug label.

If you need to add a path to exclude from the pattern, do so with DebugMe.addSegmentToSkip('test'). Remove it with DebugMe.removeSegmentToSkip('lib'). See what's there at DebugMe.segmentsToSkip.

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago