Skip to content

Commit

Permalink
Merge pull request #158 from uktrade/feature/sentry-setup
Browse files Browse the repository at this point in the history
minor:enable logging messages for Sentry initialization status
  • Loading branch information
hareshkainthdbt authored Jan 13, 2025
2 parents 490231c + d580386 commit a2393f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fbr/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
SENTRY_DSN = os.environ.get("SENTRY_DSN", None)
if SENTRY_DSN:
sentry_sdk.init(dsn=SENTRY_DSN, integrations=[DjangoIntegration()])
logging.getLogger(__name__).info("SENTRY_DSN set. Sentry is enabled.")
else:
logging.getLogger(__name__).info("SENTRY_DSN not set. Sentry is disabled.")

Expand Down Expand Up @@ -292,6 +293,10 @@
"handlers": ["asim"],
"propagate": False,
}
else:
logging.getLogger(__name__).info(
"sentry not enabled. skipping sentry logging config"
)

# Django Log Formatter ASIM settings
# See https://github.com/uktrade/django-log-formatter-asim#settings
Expand Down

0 comments on commit a2393f4

Please sign in to comment.