Skip to content

Commit 033aee1

Browse files
committed
Readme
1 parent 94d0975 commit 033aee1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Readme.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Log.js
3+
4+
Light-weight logging for [NodeJS](http://nodejs.org).
5+
6+
## Installation
7+
8+
$ npm install log
9+
10+
## Example
11+
12+
Log level defaults to __DEBUG__ however here we specify __INFO__, and the stream defaults to _stdout_:
13+
14+
var Log = require('log')
15+
, log = new Log(Log.INFO);
16+
17+
log.debug('preparing email');
18+
log.info('sending email');
19+
log.error('failed to send email');
20+
21+
Specifying a specific stream:
22+
23+
var fs = require('fs')
24+
, Log = require('log')
25+
, log = new Log(Log.DEBUG, fs.createWriteStream('my.log'));

0 commit comments

Comments
 (0)