Use log4js logger

Closes #138.
The logger will be automatically used by Windshaft on upgrade
to 0.18.1, see https://github.com/CartoDB/Windshaft/issues/140
This commit is contained in:
Sandro Santilli 2014-02-18 15:12:08 +01:00
parent 69693acea0
commit 719346a472
4 changed files with 35 additions and 4 deletions

View File

@ -1,6 +1,10 @@
1.8.1 -- 2014-02-DD
-------------------
Enhancements:
* Use log4js logger (#138)
1.8.0 -- 2014-02-18
-------------------

10
app.js
View File

@ -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();
});

22
npm-shrinkwrap.json generated
View File

@ -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"
},

View File

@ -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",