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

[LOG4J2-3418] Fix Log4j2CloudConfigLoggingSystem registration #777

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

ppkarwasz
Copy link
Contributor

This PR adds support for the spring.factories registration method of the Log4j2CloudConfigLoggingSystem to replace the old Java system properties injection method.

A Log4j 2.x log4j2.disableCloudConfigLoggingSystem property is added to enable a choice between the Log4j2CloudConfigLoggingSystem and Log4j2LoggingSystem.

@membersound
Copy link

Could you add documentation how to activate this feature in future?

This PR adds support for the `spring.factories` registration method of
the `Log4j2CloudConfigLoggingSystem` to replace the old Java system
properties injection method.

A Log4j 2.x `log4j2.disableCloudConfigLoggingSystem` property is added
to enable a choice between the `Log4j2CloudConfigLoggingSystem` and
`Log4j2LoggingSystem`.
@ppkarwasz
Copy link
Contributor Author

Could you add documentation how to activate this feature in future?

The behavior of the artifact does not change: you add it to the classpath and Spring Boot detects it. What changes is the way this is done: before Java system properties were used, so all Spring Boot applications in the JVM tried to use this plugin. After this PR only the one with log4j-spring-boot will use it.

@ppkarwasz ppkarwasz merged commit 48ab5e9 into apache:release-2.x Mar 9, 2022
@ppkarwasz ppkarwasz deleted the spring-factories branch March 9, 2022 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants