aboutsummaryrefslogtreecommitdiffstats
path: root/bot/__main__.py
diff options
context:
space:
mode:
authorGravatar Shirayuki Nekomata <[email protected]>2020-03-31 13:56:39 +0700
committerGravatar GitHub <[email protected]>2020-03-31 13:56:39 +0700
commit0a29c393cad5b66b67456a40f8273c1fc3d6271f (patch)
tree74ff29a7fa10e6d2cb5d8d63065e3a5cc91753d3 /bot/__main__.py
parent(Space Cog): Removed `async` from `create_nasa_embed` function. (diff)
parentMerge pull request #383 from python-discord/setup-sentry (diff)
Merge branch 'master' into space-cog
Diffstat (limited to 'bot/__main__.py')
-rw-r--r--bot/__main__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index a169257f..2e68a9a4 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -1,9 +1,22 @@
import logging
+import sentry_sdk
+from sentry_sdk.integrations.logging import LoggingIntegration
+
from bot.bot import bot
from bot.constants import Client, STAFF_ROLES, WHITELISTED_CHANNELS
from bot.decorators import in_channel_check
+sentry_logging = LoggingIntegration(
+ level=logging.DEBUG,
+ event_level=logging.WARNING
+)
+
+sentry_sdk.init(
+ dsn=Client.sentry_dsn,
+ integrations=[sentry_logging]
+)
+
log = logging.getLogger(__name__)
bot.add_check(in_channel_check(*WHITELISTED_CHANNELS, bypass_roles=STAFF_ROLES))