Refactor logging via "Loggable" trait #15789
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an experiment; we don't have to take this if we don't want.
First things first, I moved the "Loggable" trait into the Traits subdirectory.
I then tried to move a lot of the functionality of the "Loggable" trait into the Boot method of the trait itself, rather than relying on Observers to power it all. I was able to delete all of the observers - taking the shared Loggable functionality out into the Trait, and taking the object-specific functionality into the boot method of the object in question.
This helps by making the code that 'does the thing' physically close to 'the thing'. You don't have to open another file.
There is a ton of clean-up still to do, and there are new things I want to add, and a ton of
FIXME
comments that need addressing. And while all tests do pass, this changes a huge chunk of the functionality of the app, so there would have to be a TON of testing before we could take something like this.But I needed a distraction so I made this.