From ffdfca7d995219d7adcab87616e4c92e32e2a00b Mon Sep 17 00:00:00 2001 From: csausdev Date: Sun, 17 Apr 2011 18:25:00 +1000 Subject: [PATCH] fixing some formatting problems --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.