-
Notifications
You must be signed in to change notification settings - Fork 188
Improvement: Switched Medical Daily Notices from Reports to Log Entries #6825
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
Conversation
### Dev Notes Changed several medical notices from posting to the daily report to instead post to the log. This reduces daily report spam, without losing the information if we ever need to troubleshoot. After we're certain this system is working correctly we can change the log level from 'info' to 'debug'
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6825 +/- ##
=========================================
Coverage 11.45% 11.45%
Complexity 6499 6499
=========================================
Files 1098 1098
Lines 140854 140808 -46
Branches 21841 21829 -12
=========================================
+ Hits 16130 16131 +1
+ Misses 123050 123014 -36
+ Partials 1674 1663 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
// TODO change logging level from info to debug in 50.08 | ||
logger.info(getFormattedTextAt(RESOURCE_BUNDLE, "MedicalController.report.intro", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it, but I would prefer to have an option in campaign options where you can re-enable it to show in the campaign report, start with it disabled so if anyone complains they just have to click a button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with small campaigns (I tested with just a few people in the infirmary) it quickly becomes really spammy. We need the information, but the player has never had access to this information so nobody will notice it missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming back to this later, it's also worth mentioning that posting lots of messages to daily report on New Day actually slows down new day progression so it's something we should be avoiding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the logging of medical events from being added as daily reports to being routed through log entries, reducing spam in the daily report. Key changes include:
- Replacing campaign.addReport calls with logger.info for medical event reporting.
- Adding a static logger instance in MedicalController.
- Removing duplicate imports related to medical events.
Comments suppressed due to low confidence (2)
MekHQ/src/mekhq/campaign/personnel/medical/MedicalController.java:117
- The logging call uses info level with a TODO comment to switch to debug; consider using a consistent log level constant or updating the configuration once debug logging is confirmed for consistency.
logger.info(getFormattedTextAt(RESOURCE_BUNDLE, "MedicalController.report.natural", patient.getHyperlinkedFullTitle()));
MekHQ/src/mekhq/campaign/personnel/medical/MedicalController.java:175
- The logging call for the skill check results uses info level with a TODO to change it to debug; ensure that the log level updates are applied uniformly across all similar logging scenarios.
logger.info(skillCheckUtility.getResultsText());
Dev Notes
Changed several medical notices from posting to the daily report to instead post to the log. This reduces daily report spam, without losing the information if we ever need to troubleshoot. After we're certain this system is working correctly we can change the log level from 'info' to 'debug'