Added loggly integration (#8690)

* Added loggly integration

* Added back console logger

* Updated shrinkwrap
This commit is contained in:
Keith Holliday
2017-05-02 09:17:23 -06:00
committed by GitHub
parent dad0eea9e0
commit e3a08c1905
4 changed files with 171 additions and 117 deletions
+7
View File
@@ -1,5 +1,6 @@
// Logger utility
import winston from 'winston';
import 'winston-loggly-bulk';
import nconf from 'nconf';
import _ from 'lodash';
import {
@@ -20,6 +21,12 @@ if (IS_PROD) {
colorize: false,
prettyPrint: false,
});
logger.add(winston.transports.Loggly, {
inputToken: nconf.get('LOGGLY:TOKEN'),
subdomain: nconf.get('LOGGLY:SUBDOMAIN'),
tags: ['Winston-NodeJS'],
json: true,
});
}
} else if (!IS_TEST || IS_TEST && ENABLE_LOGS_IN_TEST) { // Do not log anything when testing unless specified
logger