Added loggly integration (#8690)
* Added loggly integration * Added back console logger * Updated shrinkwrap
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user