mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-16 11:25:22 +02:00
Utilize sentry to track execution errors
This commit is contained in:
@ -10,4 +10,6 @@ config = {
|
||||
'bots-discord-pw-token': "bots.discord.pw Post Stats Token",
|
||||
|
||||
'logging-location': "/home/titan/Titan/discordbot/titanbot.log",
|
||||
|
||||
"sentry-dsn": "Copy the dns string when creating a project on sentry",
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ from titanembeds.commands import Commands
|
||||
from titanembeds.socketio import SocketIOInterface
|
||||
from titanembeds.poststats import DiscordBotsOrg, BotsDiscordPw
|
||||
from collections import deque
|
||||
from raven import Client as RavenClient
|
||||
import raven
|
||||
import discord
|
||||
import aiohttp
|
||||
import asyncio
|
||||
@ -15,6 +17,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime
|
||||
handler = logging.FileHandler(config.get("logging-location", "titanbot.log"))
|
||||
logging.getLogger('TitanBot')
|
||||
logging.getLogger('sqlalchemy')
|
||||
try:
|
||||
raven_client = RavenClient(config["sentry-dsn"])
|
||||
except raven.exceptions.InvalidDsn:
|
||||
pass
|
||||
|
||||
class Titan(discord.AutoShardedClient):
|
||||
def __init__(self):
|
||||
|
Reference in New Issue
Block a user