-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Reduce system.dungeon logspam #39243
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
Fixes #39055. |
Co-authored-by: Perry Fraser <[email protected]>
Does this fix the bug or just combine the error messages into one? |
It merges the errors into one + count |
I guess that saves us some disk space for all the error logs, but I would have rather have the bug itself fixed so that we get no errors at all 😄 |
I feel like considering it's procgen code, that's (potentially) not exactly trivial since it's not exactly clear what the issue is since ore generation seems to be behaving fine. Considering how brutally this spams logs this feels like a fine solution as long as we have a tracking issue that this still needs properly fixed. |
We'd rather see the underlying error fixed than reducing the errors that happen; while it's nice to have them collected in the log it also risks hiding the prevalence of the underlying error. There are also concerns about allocating dictionaries for this purpose. |
About the PR
Drastically reduced the amount of
system.dungeon
log spamInstead of ~1k lines of log spam, it now prints the line, the ore vein in question, and the amount of times it had the issue
Why / Balance
It was sometimes severely bloating console logs, therefore I decided to fix it
Technical details
Made the log count the amount of groups with remaining group size and print at the end of the function, instead of printing every single time there was a remaining group size, reducing the total amount of lines printed by this function from ~5-10k to 5-10 per round

Media
Requirements
Breaking changes
Changelog