remove legacy loggly code

This commit is contained in:
Matteo Pagliazzi
2016-05-27 16:38:55 +02:00
parent 01a7880bc9
commit 2d81b31c3a
3 changed files with 2 additions and 32 deletions

View File

@@ -1,24 +1,7 @@
var nconf = require('nconf');
var winston = require('winston');
var logger, loggly;
// Currently disabled
if (nconf.get('LOGGLY:enabled')){
loggly = require('loggly').createClient({
token: nconf.get('LOGGLY:token'),
subdomain: nconf.get('LOGGLY:subdomain'),
auth: {
username: nconf.get('LOGGLY:username'),
password: nconf.get('LOGGLY:password')
},
//
// Optional: Tag to send with EVERY log message
//
tags: [('heroku-'+nconf.get('BASE_URL'))],
json: true
});
}
var logger;
if (!logger) {
logger = new (winston.Logger)({});
@@ -49,9 +32,4 @@ module.exports.warn = function(/* variable args */) {
module.exports.error = function(/* variable args */) {
if (logger)
logger.error.apply(logger, arguments);
};
module.exports.loggly = function(/* variable args */){
if (loggly)
loggly.log.apply(loggly, arguments);
};
};