-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Native image ignore structured logging fields #43861
Comments
Thanks for the report, @Jul13nT. I suspect we're missing reflection hints that allow the binding of We may have a similar problems with binding |
If you haven’t started working on it yet, @wilkinsona, would it be okay if I took it on? |
Yes please, @nosan, that'd be great. |
Add RuntimeHints for GraylogExtendedLogFormatProperties, StructuredLoggingJsonProperties and ElasticCommonSchemaProperties properties. Add BeanFactoryInitializationAotProcessor for registering RuntimeHints for a custom StructuredLoggingJsonMembersCustomizer. See spring-projectsgh-43861 Signed-off-by: Dmytro Nosan <[email protected]>
Add RuntimeHints for GraylogExtendedLogFormatProperties, StructuredLoggingJsonProperties and ElasticCommonSchemaProperties properties. Add BeanFactoryInitializationAotProcessor to register RuntimeHints for a custom StructuredLoggingJsonMembersCustomizer. See spring-projectsgh-43861 Signed-off-by: Dmytro Nosan <[email protected]>
Add RuntimeHints for GraylogExtendedLogFormatProperties, StructuredLoggingJsonProperties and ElasticCommonSchemaProperties properties. Add BeanFactoryInitializationAotProcessor to register RuntimeHints for a custom StructuredLoggingJsonMembersCustomizer. See spring-projectsgh-43861 Signed-off-by: Dmytro Nosan <[email protected]>
Add RuntimeHints for GraylogExtendedLogFormatProperties, StructuredLoggingJsonProperties and ElasticCommonSchemaProperties properties. Add BeanFactoryInitializationAotProcessor to register RuntimeHints for a custom StructuredLoggingJsonMembersCustomizer. Closes spring-projectsgh-43861 Signed-off-by: Dmytro Nosan <[email protected]>
When using the structured log feature of Spring Boot 3.4 within a native image, custom log fields are not present.
In
application.properties
:The
service.environment
property is not present in the outputted logs.Reproduction repo: https://github.com/Jul13nT/spring-native-structured-logging
First, run the application with spring-boot:run
./mvnw spring-boot:run
The produced log is:
"service.environment":"test"
is present.Then, run the application in native image:
./mvnw spring-boot:build-image -Pnative
docker run --rm -p 8080:8080 spring-native-structured-logging:0.0.1-SNAPSHOT
The log is now:
The field
service.environment
is missing.The text was updated successfully, but these errors were encountered: