Tobotimus / Tobo-Cogs

Tobo's Cogs for Red-DiscordBot
https://github.com/Cog-Creators/Red-DiscordBot
GNU General Public License v3.0
23 stars 42 forks source link

errorlogs doesn't show Logging.exception() #57

Closed SomewhatDamaged closed 4 years ago

SomewhatDamaged commented 4 years ago

As stated. I have errorlogs configured to show all Tracebacks, but when calling the logger and telling it to log an exception, it doesn't show it in channel.


        try:
            raise ValueError("blarg")
        except:
            e = sys.exc_info()[0]
            log.exception(e)```
Tobotimus commented 4 years ago

I'm afraid not how errorlogs works. It only logs tracebacks of unhandled command errors, i.e. the errors that occur when you see Error in command "command": check your console or logs for details. It does not log errors in events because they tend to be very spammy and often users don't care about them. It doesn't log handled errors because that's the responsibility of whoever is handling it.