aboutsummaryrefslogtreecommitdiffstats
path: root/snekbox/utils/logging.py
diff options
context:
space:
mode:
authorGravatar Bradley Reynolds <[email protected]>2023-03-13 12:56:02 -0500
committerGravatar GitHub <[email protected]>2023-03-13 10:56:02 -0700
commit9acc6f556f5309a1306cdd2cac612bcaa33e8ab1 (patch)
tree4b52655ee7d62432f0272e9451e0cef0677fe187 /snekbox/utils/logging.py
parentMerge pull request #170 from python-discord/files-exclude-hidden (diff)
Update Sentry SDK to support Falcon 3
Signed-off-by: Bradley Reynolds <[email protected]>
Diffstat (limited to '')
-rw-r--r--snekbox/utils/logging.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/snekbox/utils/logging.py b/snekbox/utils/logging.py
index 0bbc5e3..0082013 100644
--- a/snekbox/utils/logging.py
+++ b/snekbox/utils/logging.py
@@ -1,9 +1,6 @@
import logging
import os
import sys
-import warnings
-
-from falcon.util.deprecation import DeprecatedWarning
__all__ = ("FORMAT", "init_logger", "init_sentry")
@@ -24,14 +21,11 @@ def init_logger(debug: bool) -> None:
def init_sentry(version: str) -> None:
"""Initialise the Sentry SDK if it's installed."""
- with warnings.catch_warnings():
- warnings.filterwarnings("ignore", message=r".*\bapi_helpers\b", category=DeprecatedWarning)
-
- try:
- import sentry_sdk
- from sentry_sdk.integrations.falcon import FalconIntegration
- except ImportError:
- return
+ try:
+ import sentry_sdk
+ from sentry_sdk.integrations.falcon import FalconIntegration
+ except ImportError:
+ return
sentry_sdk.init(
dsn=os.environ.get("SNEKBOX_SENTRY_DSN", ""),