Check if logdnaKey is defined before attempting to use it.

This commit is contained in:
chris062689 2017-04-07 19:22:57 -04:00
parent 49755a4182
commit 6f48e1c379

View File

@ -19,7 +19,7 @@ var logger = new winston.Logger({
exitOnError: false exitOnError: false
}); });
if (process.env.NODE_ENV == 'production') { if (process.env.NODE_ENV == 'production' && config.logdnaKey) {
// Setup logging for LogDNA cloud logging. // Setup logging for LogDNA cloud logging.
logger.add(winston.transports.Logdna, { logger.add(winston.transports.Logdna, {
level: 'info', level: 'info',