From dea3ef8bfe62aec169b401294b5cc5f72a0f72a9 Mon Sep 17 00:00:00 2001 From: Farzad FARID Date: Tue, 23 Jun 2020 14:22:04 +0200 Subject: [PATCH 1/2] OPE-10714 Use SENTRY_ENVIRONMENT instead of NODE_ENV to set Sentry Environment Using NODE_ENV was a mistake from the start. --- README.md | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9184386..0b62ecc 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ npm install --save chpr-logger | `LOGGER_NAME` | yes | Sets the name of the logger. | | `LOGGER_LEVEL` | yes | Set the minimum level of logs. | | `SENTRY_DSN` | no | Sets the Sentry stream. ([bunyan-sentry-stream](https://www.npmjs.com/package/bunyan-sentry-stream)) | +| `SENTRY_ENVIRONMENT` | no | Sets the Sentry Environment. | | `USE_BUNYAN_PRETTY_STREAM` | no | Outputs the logs on stdout with the pretty formatting from Bunyan. Must be set to `true` to be active. ([bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream)) | | `LOGGER_USE_SENSITIVE_DATA_STREAM` | no | Use the sensitive data stream to remove any possible sensitive data from the logs (enabled by default, `false` to use the `process.stdout` stream). | | `LOGGER_SENSITIVE_DATA_PATTERN` | no | Pattern fragments to match sensitive keys (default is `(mdp|password|authorization|token|pwd|auth)`). | diff --git a/index.js b/index.js index e2c6a01..6e1e282 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ const defaultConfig = { sentry: { dsn: process.env.SENTRY_DSN, release: undefined, - environment: process.env.NODE_ENV || 'development', + environment: process.env.SENTRY_ENVIRONMENT || 'development', }, }; From 3f902a2f3c2ce400d1f40b67ce7d75bbf64154e8 Mon Sep 17 00:00:00 2001 From: Farzad FARID Date: Tue, 23 Jun 2020 14:33:30 +0200 Subject: [PATCH 2/2] OPE-10714 Update minor version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bca0c7a..62670b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chpr-logger", - "version": "3.2.0", + "version": "3.3.0", "description": "Logger for NodeJS application stack", "main": "index.js", "directories": {