Skip to content
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

Structured logging properties have no effect in a native image #43862

Closed
wants to merge 1 commit into from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Jan 16, 2025

Add RuntimeHints for GraylogExtendedLogFormatProperties, StructuredLoggingJsonProperties and ElasticCommonSchemaProperties properties.

Add BeanFactoryInitializationAotProcessor to register RuntimeHints for a custom StructuredLoggingJsonMembersCustomizer.

See gh-43861

@nosan nosan changed the base branch from main to 3.4.x January 16, 2025 18:30
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 16, 2025
@nosan

This comment was marked as resolved.

@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 16, 2025
@philwebb philwebb added this to the 3.4.x milestone Jan 16, 2025
@wilkinsona wilkinsona changed the title Native image ignore structured logging fields Format-specific structured logging properties have no effect in a native image Jan 17, 2025
@wilkinsona wilkinsona changed the title Format-specific structured logging properties have no effect in a native image Structured logging properties have no effect in a native image Jan 17, 2025
@wilkinsona
Copy link
Member

Thanks, @nosan.

For some reason ElasticCommonSchemaProperties and GraylogExtendedLogFormatProperties are public. StructuredLoggingJsonProperties is package-private.

ElasticCommonSchemaProperties and GraylogExtendedLogFormatProperties have to be public as they're used in both org.springframework.boot.logging.logback and org.springframework.boot.logging.log4j2.

@nosan
Copy link
Contributor Author

nosan commented Jan 17, 2025

Thanks, @wilkinsona

have to be public as they're used in both ...

I don't know how I missed this 😆

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 <dimanosan@gmail.com>
@wilkinsona wilkinsona self-assigned this Jan 21, 2025
@wilkinsona wilkinsona modified the milestones: 3.4.x, 3.4.2 Jan 21, 2025
wilkinsona pushed a commit that referenced this pull request Jan 21, 2025
Add RuntimeHints for GraylogExtendedLogFormatProperties,
StructuredLoggingJsonProperties and ElasticCommonSchemaProperties
properties.

Add BeanFactoryInitializationAotProcessor to register RuntimeHints
for a custom StructuredLoggingJsonMembersCustomizer.

See gh-43862

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
@wilkinsona
Copy link
Member

Thanks very much, @nosan.

arefbehboudi pushed a commit to arefbehboudi/spring-boot that referenced this pull request Jan 29, 2025
Add RuntimeHints for GraylogExtendedLogFormatProperties,
StructuredLoggingJsonProperties and ElasticCommonSchemaProperties
properties.

Add BeanFactoryInitializationAotProcessor to register RuntimeHints
for a custom StructuredLoggingJsonMembersCustomizer.

See spring-projectsgh-43862

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Signed-off-by: arefbehboudi <behboodiaref@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants