Fix ConsoleLogger throwing FormatException#208
Fix ConsoleLogger throwing FormatException#208Lachee merged 1 commit intoLachee:masterfrom jonashouben:console-format
Conversation
|
hey @jonashouben , thank you from the community :) Are you able to reproduce? is it an error related to a Discord update or something? I've tried to reproduce but on many clients works correctly. |
Unfortunately not. As written by others in the issue, it only happens for some users. But I'm relatively sure it's the exception message, because that's the only place in MainLoop where it can cause the logger to throw. |
|
@shardick maybe to clarify. The PR is fixing only the logging, not the logged error :) |
Bl0n
left a comment
There was a problem hiding this comment.
I had a user for which this issue constantly crashed the app. With this fix implemented, the issue is fully resolved for this user.
I have no idea what caused the underlying problem, as I didn't change anything to my code since September 12th, and these crashes started on September 23rd. Probably a Discord update??? I've heard from both users of normal Discord and Discord Canary that this was occurring, but I have not been able to replicate the issue.
However, as mentioned, this proposed fix does seem to resolve the issue.
|
Thank you for your contribution. The other loggers will be updated to match this before i push another release :) |
|
Hey @Lachee, thanks! As far as I noticed, the other loggers already have this behavior: FileLogger: |
|
Thanks! :) |
|
Thank you for your contribution. This is now released in |
Fixes #207.
The issue are this lines in RpcConnection. When either the Exception Message, or the Stacktrace contains a brace (for example "{").
I fixed it like in the FileLogger - only use the formatted version, when arguments are actually provided.