-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add support for Log4j2 #50
Comments
I tried to provide support for this but have found a blocking issue, so I think native support for Log4j2 needs to happen directly on library side rather than here, see related comment on their bugtracker. |
Given the fact that Log4j2 needs to happen at least partially via builtin support, I think that's better to close this issue at least for now. Upcoming discussion should happen on https://issues.apache.org/jira/browse/LOG4J2-2649. |
It might be useful to update the link to the "logging-log4j2" sample in the issue description to a version of the repository that still contains this sample (now that it has been removed). |
I have linked the sample attached to the Log4j2 issue. |
@sdeleuze I believe I have found a way to do that without changing anything into Log4j2. They need LambdaMetafactory thing to work around the Security Context switching issue. However, as Graal Native Image does not have a security manager - we do not need it, so I just replaced that class and excluded that part of the code via SVM Target/Substitute functionality. I verified my idea and provided a simple PoC for that. I have generated a basic reflect-config and manually edited it to support as many features as I could, but that is not a production-ready solution, and still, it works. Here is my PoC. I am not sure we can merge such a thing in that repo(because of NativeServiceLoaderUtil). |
--enable-url-protocols=http |
I currently see a
java.lang.NoSuchMethodException: org.apache.logging.log4j.message.DefaultFlowMessageFactory.<init>()
error in Spring smoke tests log4j2-native-tests.zip sample.The text was updated successfully, but these errors were encountered: