Sentry removal (#2439)

Resolves #2430.
This commit is contained in:
Twentysix
2019-02-11 01:19:02 +01:00
committed by Toby Harradine
parent dae75521d3
commit 889fa63aff
10 changed files with 7 additions and 199 deletions

View File

@@ -16,7 +16,6 @@ from . import Config, i18n, commands, errors
from .cog_manager import CogManager
from .help_formatter import Help, help as help_
from .rpc import RPCMixin
from .sentry import SentryManager
from .utils import common_filters
@@ -47,7 +46,6 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin):
owner=None,
whitelist=[],
blacklist=[],
enable_sentry=None,
locale="en",
embeds=True,
color=15158332,
@@ -120,23 +118,8 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin):
self.add_command(help_)
self._sentry_mgr = None
self._permissions_hooks: List[commands.CheckPredicate] = []
def enable_sentry(self):
"""Enable Sentry logging for Red."""
if self._sentry_mgr is None:
sentry_log = logging.getLogger("red.sentry")
sentry_log.setLevel(logging.WARNING)
self._sentry_mgr = SentryManager(sentry_log)
self._sentry_mgr.enable()
def disable_sentry(self):
"""Disable Sentry logging for Red."""
if self._sentry_mgr is None:
return
self._sentry_mgr.disable()
async def _dict_abuse(self, indict):
"""
Please blame <@269933075037814786> for this.
@@ -516,8 +499,6 @@ class Red(RedBase, discord.AutoShardedClient):
async def logout(self):
"""Logs out of Discord and closes all connections."""
if self._sentry_mgr:
await self._sentry_mgr.close()
await super().logout()