Skip to content

Commit

Permalink
Merge pull request #37 from transcovo/OPE-10714
Browse files Browse the repository at this point in the history
OPE-10714 Use SENTRY_ENVIRONMENT instead of NODE_ENV to set Sentry Environment
  • Loading branch information
Farzad FARID authored Jun 23, 2020
2 parents 8e217c1 + 3f902a2 commit f2ab187
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`). |
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit f2ab187

Please sign in to comment.