Skip to content
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

Mirror: Obsolete Logger cleanup for EntitySystems #132

Conversation

SimpleStation14
Copy link
Member

Mirror of PR #25941: Obsolete Logger cleanup for EntitySystems from space-wizards space-wizards/space-station-14

aafe81512258b5a80776ada1f471b58e7507ca2d

PR opened by LordCarve at 2024-03-09 12:19:14 UTC
PR merged by web-flow at 2024-03-10 00:15:13 UTC


PR changed 25 files with 41 additions and 45 deletions.

The PR had the following labels:

  • Status: Needs Review

Original Body

About the PR

Changed almost all1 obsolete Logger calls in Content's EntitySystems to use Log instead. Log automatically selects the system-specific Sawmill, so this isn't just a refactor - it makes logs slightly more accurate (puts them in appropriate sawmill/context rather than the root sawmill).

Why / Balance

Using Logger directly for logging is marked obsolete. Assumed this is a desired change.

Technical details

This changes some log contexts, but generally in a desirable way:

  • For most, it put logs in system.appropriate Sawmill rather than root.
  • For some that were forced into another Sawmill it changes it to a more specific one, i.e. from atmos it becomes system.gas_filter or system.automatic_atmos and system.station into system.station_jobs.
  • For the rest it remains unchanged

I assumed that all of the above was desirable because this seems to be the standard convention - I imagine that was the idea behind the Log in all EntitySystems coupled with [Obsolete] Logger methods - but if my assumptions are incorrect and/or there are exceptions, please let me know and I will adjust.

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Log output changes. EntitySystem logs now go to the expected Sawmill for the system rather than hardcoded/root one.
Any log analyzers anticipating these logs' context must be updated.

Footnotes

  1. There is only one EntitySystem that I didn't update - ExamineSystemShared. That is because the Logger is in a static method and refactoring that away causes a lot of cascading changes. May do it as a separate PR to avoid overly diluting this one.

@SimpleStation14 SimpleStation14 added the Pull Request Mirror Mirrors a PR from another Repo. Automatically applied by mirror bot label Apr 21, 2024
@SimpleStation14 SimpleStation14 marked this pull request as draft May 4, 2024 21:13
@VMSolidus VMSolidus marked this pull request as ready for review May 4, 2024 23:12
@VMSolidus VMSolidus enabled auto-merge (squash) May 4, 2024 23:54
@VMSolidus VMSolidus merged commit b1e3b79 into Simple-Station:master May 4, 2024
20 checks passed
Mnemotechnician pushed a commit to Mnemotechnician/Einstein-Engines that referenced this pull request Sep 9, 2024
Mnemotechnician pushed a commit to Mnemotechnician/Einstein-Engines that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pull Request Mirror Mirrors a PR from another Repo. Automatically applied by mirror bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants