-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Synchronize Log4jLogEvent-related changes from 2.x #3869
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
base: main
Are you sure you want to change the base?
Conversation
This updates `Log4jLogEvent` and its builder class to work similarly to what is in 2.25.0. The previously added `MementoLogEvent` class can be removed as the builder can make memento copies better.
@ppkarwasz, you authored #3171, which this PR originates from. I'd appreciate it if you can help with the review. |
I'll review this PR later this week, but please note this is a challenging port. The changes introduced in #3171 primarily address backward compatibility. The concept of "mutability" in version 2.x has been quite confusing, and I believe we have an opportunity to improve clarity significantly in 3.x. Specifically:
These are preliminary thoughts, and since I haven't reviewed the changes thoroughly yet, some of these ideas might already be implemented. |
The naming overlap with similar but not equal method names is related to what you identified here (classes implementing both
That sounds a little bit of an internal detail considering these checks are largely relevant to when an object is returned a pool (which is how we got rid of the frozen flag in some reusable class after adding
I think with the changes you made such that
I did remove an extra |
This updates
Log4jLogEvent
and its builder class to work similarly to what is in 2.25.0. The previously addedMementoLogEvent
class can be removed as the builder can make memento copies better.This ports changes introduced in #3171 which seems somewhat inspired by changes made in
main
previously. However, due to the changes inLog4jLogEvent
, this removes the need for the added memento class.