aboutsummaryrefslogtreecommitdiffstats
path: root/bot/__main__.py
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-28 15:59:40 +0100
committerGravatar kwzrd <[email protected]>2020-03-28 15:59:40 +0100
commitadeacd6beeca90968dfc5cbce007034b7f54bf66 (patch)
treed4598667d9799f3bc97fa9e2660d4bd9b00d22e3 /bot/__main__.py
parentDeseasonify: make `get_extensions` an iterator (diff)
parentMerge pull request #383 from python-discord/setup-sentry (diff)
Merge master: sentry sdk, updated contributing docs
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 8b6ee782..0ffd6143 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -1,10 +1,23 @@
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.exts import walk_extensions
from bot.utils.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))