From 57ac8b55797217584a553bbea4b178a1068ca918 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 10 Sep 2019 13:30:13 +0200 Subject: [PATCH] Don't send error logs as events --- royalnet/bots/generic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/royalnet/bots/generic.py b/royalnet/bots/generic.py index 9e94801f..34adbc30 100644 --- a/royalnet/bots/generic.py +++ b/royalnet/bots/generic.py @@ -5,6 +5,7 @@ import logging import sentry_sdk from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration from sentry_sdk.integrations.aiohttp import AioHttpIntegration +from sentry_sdk.integrations.logging import LoggingIntegration from ..utils import * from ..network import * from ..database import * @@ -136,7 +137,9 @@ class GenericBot: self.loop = loop if sentry_dsn: log.debug("Sentry integration enabled") - self.sentry = sentry_sdk.init(sentry_dsn, integrations=[AioHttpIntegration(), SqlalchemyIntegration()]) + self.sentry = sentry_sdk.init(sentry_dsn, integrations=[AioHttpIntegration(), + SqlalchemyIntegration(), + LoggingIntegration(event_level=None)]) else: log.debug("Sentry integration disabled") try: