fixing some formatting problems
This commit is contained in:
parent
1ee8cfcd74
commit
ffdfca7d99
@ -20,10 +20,13 @@ Tests now use [vows](http://vowsjs.org), run with `vows test/*.js`.
|
|||||||
## usage
|
## usage
|
||||||
|
|
||||||
Minimalist version:
|
Minimalist version:
|
||||||
|
|
||||||
var log4js = require('log4js')();
|
var log4js = require('log4js')();
|
||||||
var logger = log4js.getLogger();
|
var logger = log4js.getLogger();
|
||||||
logger.debug("Some debug messages");
|
logger.debug("Some debug messages");
|
||||||
|
|
||||||
By default, log4js outputs to stdout with the coloured layout (thanks to [masylum](http://github.com/masylum)), so for the above you would see:
|
By default, log4js outputs to stdout with the coloured layout (thanks to [masylum](http://github.com/masylum)), so for the above you would see:
|
||||||
|
|
||||||
[2010-01-17 11:43:37.987] [DEBUG] [default] - Some debug messages
|
[2010-01-17 11:43:37.987] [DEBUG] [default] - Some debug messages
|
||||||
|
|
||||||
See example.js:
|
See example.js:
|
||||||
@ -42,7 +45,8 @@ See example.js:
|
|||||||
logger.error('Cheese is too ripe!');
|
logger.error('Cheese is too ripe!');
|
||||||
logger.fatal('Cheese was breeding ground for listeria.');
|
logger.fatal('Cheese was breeding ground for listeria.');
|
||||||
|
|
||||||
Output
|
Output:
|
||||||
|
|
||||||
[2010-01-17 11:43:37.987] [ERROR] cheese - Cheese is too ripe!
|
[2010-01-17 11:43:37.987] [ERROR] cheese - Cheese is too ripe!
|
||||||
[2010-01-17 11:43:37.990] [FATAL] cheese - Cheese was breeding ground for listeria.
|
[2010-01-17 11:43:37.990] [FATAL] cheese - Cheese was breeding ground for listeria.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user