-
Notifications
You must be signed in to change notification settings - Fork 81
Support for log4j 2.6 #100
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
Conversation
This is the earliest version to support builders
((MultiFormatStringBuilderFormattable) message).formatTo(JSON_FORMAT, messageBuffer); | ||
if (MULTI_FORMAT_STRING_BUILDER_FORMATTABLE.isInstance(message)) { | ||
try { | ||
FORMAT_TO.invoke(message, JSON_FORMAT, messageBuffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to invoking this via reflection would be to have an isolated class calling MultiFormatStringBuilderFormattable#formatTo
that's only loaded if the class is available.
The downside is that it wouldn't be possible to compile and test against the old version easily. However, we do want to test against the new version so that we can actually test this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to invoking this via reflection would be to have an isolated class calling MultiFormatStringBuilderFormattable#formatTo that's only loaded if the class is available.
That's what I ended up with now.
The downside is that it wouldn't be possible to compile and test against the old version easily.
There's now a separate log4j2-legacy-tests
module that tests against log4j 2.6 while the main module compiles against the most recent version (2.14.0)
2.6 has been released in May 2016
closes #96