Skip to content

Commit

Permalink
src/config: Set sentry's logLevels correctly (#596)
Browse files Browse the repository at this point in the history
* src/config: Set sentry's logLevels correctly
logLevel has been deprecated in nestjs-sentry package, in favor of logLevels, which expects an array of Sentry LogLevels

* src/config: Allow logging only for errors and warns
  • Loading branch information
sashko9807 authored Jan 10, 2024
1 parent 33a0845 commit 97adc1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/api/src/config/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { SeverityLevel } from '@sentry/node'

/**
* Be sure to add `process.env` vars in validation schema at ./validation.config.ts
*/
Expand All @@ -13,7 +15,7 @@ export default () => ({
environment: process.env.APP_ENV,
debug: false,
enabled: process.env.APP_ENV !== 'development',
logLevel: 'debug',
logLevels: ['error', 'warn'] as SeverityLevel[],
tracesSampleRate: 1.0,
},
sendgrid: {
Expand Down

0 comments on commit 97adc1f

Please sign in to comment.