more-log4j2-2.2.0 has been released
I have spent quite some time hardening more-log4j2 after doing an extensive review of the entire code-base with Claude Fable 5.2 and Opus 5.5. Here is what changes with more-log4j2-2.2.0:
- ThrottlingFilter has been reworked completely:
- The old implementation contained a deliberately accepted race to max out performance, which would occasionally let
additional logs through. The new implementation is 100% exact and still significantly more lightweight than the
BurstFilter shipped with log4j2:
ThrottlingFilterencodes its state in a single atomic long and doesn’t allocate any objects.
- The old implementation contained a deliberately accepted race to max out performance, which would occasionally let
additional logs through. The new implementation is 100% exact and still significantly more lightweight than the
BurstFilter shipped with log4j2:
- Fixes in the AsyncHttpAppender:
- There is no longer a tiny chance of events being stuck in the internal buffer of the appender under very special conditions.
readTimeoutMsnow consistently applies to the whole request on all supported Java versions, instead of only the time it takes to receive the response headers. This issue has been addressed injava.net.http.HttpClientin the scope of JDK-8208693 with Java 26. The appender adds its own deadline for older Java versions.- Invalid header values are no longer written to the status log, since they might contain sensitive information.
- APIs reachable from
AsyncHttpAppender.BatchCompletionEventthat were previously package private are now public. - Response bodies are consumed only up to a limit to avoid issues if logs are pushed to misbehaved servers.
Apart from that, I’ve worked quite a bit on chasing flaky tests and refactored the code here and there to make it more readable.