Removes support for optional rollbar logging

This commit is contained in:
Raul Ochoa 2016-09-14 19:22:31 +02:00
parent ec23a9de67
commit 0626d80e24
7 changed files with 7 additions and 96 deletions

View File

@ -1,6 +1,9 @@
1.34.3 - 2016-mm-dd
1.35.0 - 2016-mm-dd
-------------------
Announcements:
* Removes support for optional rollbar logging.
1.34.2 - 2016-08-30
-------------------

7
app.js
View File

@ -60,13 +60,6 @@ if ( env.log_filename ) {
);
}
if ( global.settings.rollbar ) {
log4js_config.appenders.push({
type: __dirname + "/app/models/log4js_rollbar.js",
options: global.settings.rollbar
});
}
global.log4js.configure(log4js_config, { cwd: __dirname });
global.logger = global.log4js.getLogger();

View File

@ -1,51 +0,0 @@
var rollbar = require("rollbar");
/**
* Rollbar Appender. Sends logging events to Rollbar using node-rollbar
*
* @param config object with rollbar configuration data
* {
* token: 'your-secret-token',
* options: node-rollbar options
* }
*/
function rollbarAppender(config) {
var opt = config.options;
rollbar.init(opt.token, opt.options);
return function(loggingEvent) {
/*
For logger.trace('one','two','three'):
{ startTime: Wed Mar 12 2014 16:27:40 GMT+0100 (CET),
categoryName: '[default]',
data: [ 'one', 'two', 'three' ],
level: { level: 5000, levelStr: 'TRACE' },
logger: { category: '[default]', _events: { log: [Object] } } }
*/
// Levels:
// TRACE 5000
// DEBUG 10000
// INFO 20000
// WARN 30000
// ERROR 40000
// FATAL 50000
//
// We only log error and higher errors
//
if ( loggingEvent.level.level < 40000 ) {
return;
}
rollbar.reportMessage(loggingEvent.data);
};
}
function configure(config) {
return rollbarAppender(config);
}
exports.name = "rollbar";
exports.appender = rollbarAppender;
exports.configure = configure;

View File

@ -64,14 +64,6 @@ module.exports.tableCacheMaxAge = 1000*60*10;
module.exports.tmpDir = '/tmp';
// change ogr2ogr command or path
module.exports.ogr2ogrCommand = 'ogr2ogr';
// Optional rollbar support
module.exports.rollbar = {
token: 'secret',
// See http://github.com/rollbar/node_rollbar#configuration-reference
options: {
handler: 'inline'
}
}
// Optional statsd support
module.exports.statsd = {
host: 'localhost',

View File

@ -64,14 +64,6 @@ module.exports.tableCacheMaxAge = 1000*60*10;
module.exports.tmpDir = '/tmp';
// change ogr2ogr command or path
module.exports.ogr2ogrCommand = 'ogr2ogr';
// Optional rollbar support
module.exports.rollbar = {
token: 'secret',
// See http://github.com/rollbar/node_rollbar#configuration-reference
options: {
handler: 'inline'
}
}
// Optional statsd support
module.exports.statsd = {
host: 'localhost',

23
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "cartodb_sql_api",
"version": "1.34.2",
"version": "1.34.3",
"dependencies": {
"cartodb-psql": {
"version": "0.6.1",
@ -120,9 +120,9 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
},
"inherits": {
"version": "2.0.1",
"version": "2.0.3",
"from": "inherits@>=2.0.1 <2.1.0",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
}
}
},
@ -204,23 +204,6 @@
}
}
},
"rollbar": {
"version": "0.3.13",
"from": "rollbar@>=0.3.2 <0.4.0",
"resolved": "https://registry.npmjs.org/rollbar/-/rollbar-0.3.13.tgz",
"dependencies": {
"lru-cache": {
"version": "2.2.4",
"from": "lru-cache@>=2.2.1 <2.3.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz"
},
"json-stringify-safe": {
"version": "5.0.1",
"from": "json-stringify-safe@>=5.0.0 <5.1.0",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
}
}
},
"step": {
"version": "0.0.6",
"from": "step@>=0.0.5 <0.1.0",

View File

@ -29,7 +29,6 @@
"oauth-client": "0.3.0",
"queue-async": "~1.0.7",
"redis-mpool": "0.4.0",
"rollbar": "~0.3.2",
"step": "~0.0.5",
"step-profiler": "~0.3.0",
"topojson": "0.0.8",