-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging: Default Global Exception Handler and Standardized Legacy Logging #993
Logging: Default Global Exception Handler and Standardized Legacy Logging #993
Conversation
…acy logging setup
Interesting. Does this affect the AWT event thread? I'd expect exceptions to mostly happen there. |
I tested using AWT, for exactly that reason. Plus it's a thread we don't directly control, which ensures that it holds across the system. With AWT Exceptions it won't always do the graphical display, but does properly log the exception to the primary log file (MegaMekLab.log for MML). |
I will be watching the legacy log though, to ensure everything is caught. Once I'm done converting the remaining legacy logging to the log manager I'll remove the clearing functionality, and hopefully we will see an empty log from our constant dev version players. If those stay empty for a few releases, I'll know we can (finally) remove the old redirect. |
Just for the record, I gave it a quick test by changing line 48 in MegaMekLabMainUI to |
It does log on the proper log file though, not the legacy one... right? If so, then it's still an improvement for that case. Otherwise... I'll take a second look because that's not how it's working on my end |
It appeared in megameklab.log. Is megameklablog.txt the legacy one then? (Sorry Im a bit oblivious there, I tend to comment out the logging to have exceptions in the console) |
Legacy.log will be the new legacy logger, which is the console redirect. LogManager writes to MegaMekLab.log, so it's an improvement above the current and will help us remove our ancient logging redirect. |
I've also sent you a Log4j2.xml file that will let you redirect to console going forwards. |
MegaMekLab side of MegaMek/megamek#3346