[ 
https://issues.apache.org/jira/browse/LOG4J2-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613599#comment-17613599
 ] 

Matt Sicker commented on LOG4J2-2649:
-------------------------------------

I've tried using GraalVM in a small CLI at work recently and couldn't even get 
that to work with the standard Java crypto/security APIs as those already rely 
on reflection to load everything (though it seemed as though directly using 
Bouncycastle APIs rather than the JCA ones would work). I've been interested in 
this general idea ever since Micronaut and Quarkus were created with annotation 
processors to generate code rather than relying on reflection, though the 
tooling available there is even lower level than reflection, so I hadn't really 
looked into what it would take to generate relevant code from our annotation 
processor. In theory, we should be able to generate some reflection JSON file 
that directs the compiler to keep metadata about all of log4j essentially for 
reflection usage, though I'm not sure what the impact of that is in compiled 
code.

Anyone with more production experience with GraalVM would be welcome to provide 
more suggestions and info on how to best support that environment, especially 
as Spring Boot 3 gets to GA which I think may help increase adoption of GraalVM 
quite a bit.

>  Is Log4j2 considered to support successful static compilation under GraalVM?
> -----------------------------------------------------------------------------
>
>                 Key: LOG4J2-2649
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2649
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: YangGuanchao
>            Priority: Blocker
>         Attachments: log4j2-native-tests.zip
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Oracle released GraalVM [https://github.com/oracle/graal] to support the 
> static compilation of Java applications to Native Image, which can increase 
> the startup speed of Java by at least 10 times. In the cloud native field, 
> this basic technology is believed to be in the near future. Will be supported 
> by more and more vendors, such as the Spring/Spring Boot community has 
> supported or plans to support the feature of GraalVM, see this issue: 
> [https://github.com/spring-projects/spring-framework/search?q=Graalvm&type=Issues]
>  can support static compilation, so it is recommended that Log4j2 also need 
> to support static compilation as soon as possible, and can be compiled 
> correctly under GraalVM.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to