From 0f4366385e5177c3caebc1855bfe2a45fc629f6b Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Tue, 6 Dec 2016 23:16:34 +0200 Subject: [PATCH] #169: separate environment option for sentry logging --- src/services/logger.js | 2 +- webpack.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/logger.js b/src/services/logger.js index 1fe7547..24a972d 100644 --- a/src/services/logger.js +++ b/src/services/logger.js @@ -8,7 +8,7 @@ const logger = { Raven.config(sentryCdn, { logger: 'accounts-js-app', level: 'info', - environment: process.env.NODE_ENV, // eslint-disable-line + environment: process.env.APP_ENV, // eslint-disable-line release: process.env.__VERSION__, // eslint-disable-line shouldSendCallback: () => !isTest, dataCallback: (data) => { diff --git a/webpack.config.js b/webpack.config.js index 367b3a8..2f447f0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -110,6 +110,7 @@ const webpackConfig = { 'window.sentryCdn': config.sentryCdn ? JSON.stringify(config.sentryCdn) : undefined, 'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV), + APP_ENV: JSON.stringify(config.environment || process.env.NODE_ENV), __VERSION__: JSON.stringify(packageJson.version), __DEV__: !isProduction, __TEST__: isTest,