mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
feat(loggly): add loggly
This commit is contained in:
parent
ae762837e2
commit
7356e0bafe
2 changed files with 19 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
|||
"jade": "~1.7.0",
|
||||
"js2xmlparser": "~0.1.2",
|
||||
"lodash": "~2.4.1",
|
||||
"loggly": "~1.0.8",
|
||||
"method-override": "~2.2.0",
|
||||
"moment": "~2.8.3",
|
||||
"mongoose": "~3.8.17",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,19 @@ var winston = require('winston');
|
|||
require('winston-mail').Mail;
|
||||
require('winston-newrelic');
|
||||
|
||||
var 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']
|
||||
});
|
||||
|
||||
var logger;
|
||||
|
||||
if (logger == null) {
|
||||
|
|
@ -49,3 +62,8 @@ module.exports.error = function(/* variable args */) {
|
|||
if (logger)
|
||||
logger.error.apply(logger, arguments);
|
||||
};
|
||||
|
||||
module.exports.loggly = function(/* variable args */){
|
||||
if(loggly)
|
||||
loggly.log(loggly, arguments);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue