diff options
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/main.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nodejs/main.js b/src/nodejs/main.js index 37e106d..7895cff 100644 --- a/src/nodejs/main.js +++ b/src/nodejs/main.js @@ -20,7 +20,7 @@ var log4js = require('log4js')(); //note the need to call the function //log4js.addAppender(log4js.fileAppender('osm-xapi.log'), 'cheese'); var log = log4js.getLogger('global'); -log.setLevel('ALL'); +log.setLevel(config['logLevel']); log.info("server starting..."); @@ -119,8 +119,8 @@ function connectionError(err, res) { function db_connect(res, callback) { pg.connect(connectionString, function(err, client) { if(err) { - log.error('message'); - res.writeHead(404,{}); + log.error(err.message); + res.writeHead(500,{}); res.end(); } else { log.info("db connection was successfull"); |