0.1.9 • Published 10 years ago

node-debug-tool v0.1.9

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

Node Debug Tool

Build Status

Tiny node.js debugging tool with colors and timing functionality

Table of contents

Installation

 $ npm install node-debug-tool

Usage

The DEBUG_MODE environment variable, must be set to a namespace in order to see the debugging information.

Code example:

  var ab = require('../lib/node-debug-tool')('Foo:bar:x');
  var abc = require('../lib/node-debug-tool')('foo:bar:y');
  var abcd = require('../lib/node-debug-tool')('foo:abc');
  var abcde = require('../lib/node-debug-tool')('other');

  ab.log('Some foo bar x');
  abc.log('Some foo bar y');
  abcd.log('Some foo abc');
  other.log('Some other');

The code above possible outputs:

  1. in case of running with DEBUG_MODE=*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
   [Foo:Abc] [Debug] "Some foo abc"  +0ms
   [Other] [Debug] "Some other"  +0ms
  1. in case of running with DEBUG_MODE=foo:*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
   [Foo:Abc] [Debug] "Some foo abc"  +0ms
  1. in case of running with DEBUG_MODE=foo:bar:*:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
   [Foo:Bar:Y] [Debug] "Some foo bar y"  +0ms
  1. in case of running with DEBUG_MODE=foo:bar:x:
   [Foo:Bar:X] [Debug] "Some foo bar x"  +0ms
0.1.9

10 years ago

0.1.8

10 years ago

0.1.6

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago