-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Add native image support for Log4J integration #46410
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 native image support for Log4J integration #46410
Conversation
Blocked on #46334. |
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.
@ppkarwasz thanks for the PR. can you please review the comments and rebase now that we have upgraded to 2.25.x
Also, wondering about Jackson as we've moved to Jackson 3 by default and users would have then to bring Jackson 2 to be able to parse a YAML configuration?
core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java
Outdated
Show resolved
Hide resolved
core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java
Outdated
Show resolved
Hide resolved
core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2RuntimeHints.java
Outdated
Show resolved
Hide resolved
Unfortunately the rebase isn't done properly. If I try to squash all those commits into one, I am getting back to merge conflicts. Can you please sort that out? |
This change introduces AOT runtime hints for Log4j Core 2 to support its integration with Spring Boot native images. Starting with version `2.25.0`, Log4j Core 2 includes built-in GraalVM reachability metadata, allowing native image generation without requiring additional manual configuration. This contribution complements that by adding Spring Boot–specific metadata: * Registers default Spring Boot configuration files. * Registers classes referenced via `ClassUtils.isPresent(...)` checks. Fixes spring-projects#42273. > [!NOTE] > This change should be reviewed in conjunction with spring-projects#46334, which configures Log4j Core’s `GraalVmProcessor` to generate reachability metadata for Spring Boot’s custom Log4j plugins. Signed-off-by: Piotr P. Karwasz <[email protected]>
b4af397
to
06fc66c
Compare
I usually |
Signed-off-by: Piotr P. Karwasz <[email protected]>
This change introduces runtime hints for Log4j Core 2 to support its integration with Spring Boot native images. Starting with Log4j 2.25.x, Log4j includes built-in GraalVM reachability metadata, allowing native image generation without requiring additional manual configuration. This contribution complements that by adding Spring Boot–specific metadata: * Registers default Spring Boot configuration files. * Registers classes referenced via `ClassUtils.isPresent(...)` checks. See gh-46410 Signed-off-by: Piotr P. Karwasz <[email protected]>
This change introduces AOT runtime hints for Log4j Core 2 to support its integration with Spring Boot native images.
Starting with version
2.25.0
, Log4j Core 2 includes built-in GraalVM reachability metadata, allowing native image generation without requiring additional manual configuration.This contribution complements that by adding Spring Boot–specific metadata:
ClassUtils.isPresent(...)
checks.Fixes #42273.
Note
This change should be reviewed in conjunction with #46334, which configures Log4j Core’s
GraalVmProcessor
to generate reachability metadata for Spring Boot’s custom Log4j plugins.