Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPE-10714 Use SENTRY_ENVIRONMENT instead of NODE_ENV to set Sentry Environment #37

Merged
merged 2 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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