From 6f48e1c379820817462035d674c4148633f8ef40 Mon Sep 17 00:00:00 2001 From: chris062689 Date: Fri, 7 Apr 2017 19:22:57 -0400 Subject: [PATCH] Check if logdnaKey is defined before attempting to use it. --- logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logging.js b/logging.js index a0010e0..0e8b814 100644 --- a/logging.js +++ b/logging.js @@ -19,7 +19,7 @@ var logger = new winston.Logger({ exitOnError: false }); -if (process.env.NODE_ENV == 'production') { +if (process.env.NODE_ENV == 'production' && config.logdnaKey) { // Setup logging for LogDNA cloud logging. logger.add(winston.transports.Logdna, { level: 'info',