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
Igor Urminček
committed
Jun 30, 2011
1 parent
15a0444
commit 6dc4707
Showing
8 changed files
with
52 additions
and
28 deletions.
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
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
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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
var logger = require('nlogger').logger(module); | ||
|
||
logger.info('Message from first module from line #3'); | ||
logger.debug({one: 1, two: 2}); | ||
|
||
logger.info('Message with {} parameters. Works also with objects {}. Cool!', 'some', { a: 1, b: 2 }); | ||
logger.info('One = {}, two = {}, 3 = {}, four = {}', 1, 2, 'three', 4); | ||
logger.info('Array = {}, Object = {}', [1, 2, 3, 4], {one: 1, two: 2}); | ||
|
||
try { | ||
throw new Error('Throwing sample error'); | ||
} catch(e) { | ||
logger.error('Something went wrong! Catched {}', e.message); | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,3 @@ | ||
var logger = require('nlogger').logger(module); | ||
var logger = require('nlogger').logger('my-custom-name'); | ||
|
||
// some dummy empty lines | ||
|
||
|
||
|
||
|
||
|
||
|
||
logger.info('Message from second module from line #10'); | ||
logger.info('Message from second module with defined module name'); |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
var logger = require('nlogger').logger('fake-module-name'); | ||
var logger = require('nlogger').logger(); | ||
|
||
logger.info('Message from third module from line #3'); | ||
logger.info('Ops! We forgot module name in this file'); |
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
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