diff --git a/README.md b/README.md index 6f6b6f6..dcd17e7 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,13 @@ Tests now use [vows](http://vowsjs.org), run with `vows test/*.js`. ## usage Minimalist version: + var log4js = require('log4js')(); var logger = log4js.getLogger(); 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: + [2010-01-17 11:43:37.987] [DEBUG] [default] - Some debug messages See example.js: @@ -42,7 +45,8 @@ See example.js: logger.error('Cheese is too ripe!'); 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.990] [FATAL] cheese - Cheese was breeding ground for listeria.