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

Improve implementations of LogEvent.toImmutable() and ReusableMessage.memento() #3171

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Commits on Nov 4, 2024

  1. Improve implementations of LogEvent.toImmutable()

    The implementations of `LogEvent.toImmutable()` either use serialization or one of the `Log4jLogEvent.Builder` constructors and custom per class code.
    
    This PR:
    
    - Redirects all implementation of `LogEvent.toImmutable` to the `Builder(LogEvent)` constructor (except `Log4jLogEvent.toImmutable()`)
    - Improve the constructor to create really immutable and thread-safe instances.
    - Removes the usage of `ThrowableProxy` for purposes not related to serialization.
    - Fixes some implementations of `ReusableMessage.memento()`.
    - Uses `ReusableMessage.memento()` instead of `ImmutableMessage` where
      applicable.
    ppkarwasz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8434f99 View commit details
    Browse the repository at this point in the history