ppkarwasz commented on PR #3869: URL: https://github.com/apache/logging-log4j2/pull/3869#issuecomment-3149930632
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: * The methods `ReusableMessage.memento()` and `LogEvent.toMemento()` have similar names but return fundamentally different types (`Message` vs. `LogEvent`). This naming overlap can cause confusion, especially since classes like `ReusableLogEvent` implement both interfaces (`ReusableMessage` and `LogEvent`). * Introducing a method such as `freeze()`/`isFrozen()` could be beneficial in scenarios where the log event has reached its final state and is guaranteed not to change further. * Considering that approximately 99% of log messages utilize the standard three types (`ObjectMessage`, `SimpleMessage`, and `ParameterizedMessage`), it may be advantageous to streamline the logging pipeline by exclusively using either `Log4jLogEvent` or `MutableLogEvent`. These classes could implement both the `Message` (or `ReusableMessage`) and `LogEvent` interfaces, thereby simplifying the architecture. These are preliminary thoughts, and since I haven't reviewed the changes thoroughly yet, some of these ideas might already be implemented. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org