aboutsummaryrefslogtreecommitdiff
path: root/node_modules/debug-log/readme.md
blob: 1a0e2c81c25371224c0a548ccf4263ae17979778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# debug-log [![Build Status](https://travis-ci.org/sindresorhus/debug-log.svg?branch=master)](https://travis-ci.org/sindresorhus/debug-log)

> Node.js 0.12 [`util.debuglog()`](http://nodejs.org/api/util.html#util_util_debuglog_section) [ponyfill](https://ponyfill.com)


## Install

```
$ npm install --save debug-log
```


## Usage

```js
// example.js
var debugLog = require('debug-log')('foo');

debugLog('unicorns & rainbows');
```

```
$ node example.js

```

```
$ NODE_DEBUG=foo node example.js
FOO 3245: unicorns & rainbows
```


## API

See the [`util.debuglog()` docs](http://nodejs.org/api/util.html#util_util_debuglog_section).


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)