diff --git a/NEWS.md b/NEWS.md index 73f4aeaf..f0cb27b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ 1.8.1 -- 2014-02-DD ------------------- +Enhancements: + + * Use log4js logger (#138) + 1.8.0 -- 2014-02-18 ------------------- diff --git a/app.js b/app.js index 9efd3b84..66692a85 100755 --- a/app.js +++ b/app.js @@ -24,6 +24,15 @@ global.settings = require(__dirname + '/config/settings'); global.environment = require(__dirname + '/config/environments/' + ENV); _.extend(global.settings, global.environment); +global.log4js = require('log4js') +log4js.configure({ + appenders: [ + { type: "console", layout: { type:'basic' } } + ], + replaceConsole:true +}); + + // Include cartodb_windshaft only _after_ the "global" variable is set // See https://github.com/Vizzuality/Windshaft-cartodb/issues/28 var CartodbWindshaft = require('./lib/cartodb/cartodb_windshaft'); @@ -52,3 +61,4 @@ process.on('SIGUSR1', function() { process.on('SIGUSR2', function() { ws.dumpCacheStats(); }); + diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e6197763..f7b0c4f7 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "windshaft-cartodb", - "version": "1.8.0", + "version": "1.8.1", "dependencies": { "node-varnish": { "version": "0.2.0", @@ -413,12 +413,28 @@ "lzma": { "version": "1.2.3" }, - "redis": { - "version": "0.8.6" + "log4js": { + "version": "0.6.10", + "dependencies": { + "async": { + "version": "0.1.15" + }, + "readable-stream": { + "version": "1.0.25-1", + "dependencies": { + "string_decoder": { + "version": "0.10.25-1" + } + } + } + } }, "strftime": { "version": "0.6.2" }, + "redis": { + "version": "0.8.6" + }, "semver": { "version": "1.1.4" }, diff --git a/package.json b/package.json index 086d0238..7d2c26a6 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "cartodb-redis": "~0.3.0", "redis-mpool": "~0.0.2", "mapnik": "~0.7.22", - "lzma": "~1.2.3" + "lzma": "~1.2.3", + "log4js": "~0.6.10" }, "devDependencies": { "mocha": "1.14.0",