From ef40dfbef99938969de07fe82c8bffbb67303faf Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 21 Jan 2011 19:23:48 +0100 Subject: adding log level (cont.) --- src/nodejs/config.json | 1 + src/nodejs/xmlGenerator.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nodejs/config.json b/src/nodejs/config.json index 9c18203..be796a7 100644 --- a/src/nodejs/config.json +++ b/src/nodejs/config.json @@ -1,3 +1,4 @@ exports.connectionString = "pg://user:password@host/database"; exports.host = 'localhost'; exports.port = 8080; +exports.logLevel = 'ERROR'; diff --git a/src/nodejs/xmlGenerator.js b/src/nodejs/xmlGenerator.js index e982e18..97cd2ae 100644 --- a/src/nodejs/xmlGenerator.js +++ b/src/nodejs/xmlGenerator.js @@ -1,10 +1,12 @@ +var config = require('./config.json'); + var builder = require('xmlbuilder'); //set up logger var log4js = require('log4js')(); //note the need to call the function //log4js.addAppender(log4js.fileAppender('osm-xapi.log'), 'cheese'); var log = log4js.getLogger('xmlGenerator'); -log.setLevel('ALL'); +log.setLevel(config.logLevel); exports.createNode = function (row) { -- cgit v1.2.3