Skip to content

Commit

Permalink
chore(api): update sentry log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Feb 18, 2024
1 parent 8a2fa58 commit 976026c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ class CustomLogger implements LoggerService {
}

async function initializeSentry() {
const logger = new CustomLogger()

if (
!process.env.SENTRY_DSN ||
!process.env.SENTRY_ORG ||
!process.env.SENTRY_PROJECT ||
!process.env.SENTRY_AUTH_TOKEN
) {
Logger.warn(
logger.warn(
'Missing one or more Sentry environment variables. Skipping initialization...'
)
} else {
Expand All @@ -68,6 +70,8 @@ async function initializeSentry() {
integrations: [new ProfilingIntegration()],
debug: sentryEnv.startsWith('dev')
})

logger.log('Sentry initialized')
}
}

Expand Down

0 comments on commit 976026c

Please sign in to comment.