Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var Log = require('../lib/log') | ||
, fs = require('fs') | ||
, stream = fs.createWriteStream(__dirname + '/file.log') | ||
, log = new Log('debug', stream); | ||
|
||
log.debug('a debug message'); | ||
log.info('a info message'); | ||
log.notice('a notice message'); | ||
log.warning('a warning message'); | ||
log.error('a error message'); | ||
log.critical('a critical message'); | ||
log.alert('a alert message'); | ||
log.emergency('a emergency message'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Sun, 26 Sep 2010 01:10:23 GMT] DEBUG a debug message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] INFO a info message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] NOTICE a notice message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] WARNING a warning message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] ERROR a error message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] CRITICAL a critical message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] ALERT a alert message | ||
[Sun, 26 Sep 2010 01:10:23 GMT] EMERGENCY a emergency message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters