-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Replace PropertiesUtil with PropertyEnvironment
#2396
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
7757e81 to
c3f4261
Compare
vy
approved these changes
Mar 26, 2024
Member
vy
left a comment
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.
This is a big change, but I can see the reason why the PR is massive. Left some minor questions. Did not spot any blockers. Feel free to proceed as you wish. Great job! 💯
log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfigurationFactory.java
Outdated
Show resolved
Hide resolved
log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfigurationFactory.java
Outdated
Show resolved
Hide resolved
log4j-1.2-api/src/test/java/org/apache/log4j/config/AutoConfigTest.java
Outdated
Show resolved
Hide resolved
log4j-1.2-api/src/test/java/org/apache/log4j/config/PropertiesConfigurationFactoryTest.java
Show resolved
Hide resolved
log4j-api-test/src/main/java/org/apache/logging/log4j/test/junit/Resources.java
Outdated
Show resolved
Hide resolved
log4j-api-test/src/main/java/org/apache/logging/log4j/test/junit/Tags.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
Outdated
Show resolved
Hide resolved
log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jPropertyKey.java
Show resolved
Hide resolved
...j-jctools/src/main/java/org/apache/logging/log4j/jctools/JCToolsRecyclerFactoryProvider.java
Show resolved
Hide resolved
.../src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutDefaults.java
Outdated
Show resolved
Hide resolved
ppkarwasz
added a commit
that referenced
this pull request
Mar 27, 2024
This replaces `PropertiesUtil` with `PropertyEnvironment` in modules that depend on Log4j Core. It also ensures that every logger context has a different version of `PropertyEnvironment`.
ec802f4 to
54b412a
Compare
Property names are often inconsistent. This commit: * changes `log4j.configuration.file` to `log4j.configuration.location`, since the value is not necessarily a file, * the names of property classes end in `Properties`, whereas their prefix starts with a small letter, * the `AsyncLogger` and `AsyncLoggerConfig` properties are merged into one class, since they should not be used together, * the `AuthenticationProvider` is removed from `ConfigurationProperties` and placed in a standalone class, since multiple components use it.
54b412a to
de42610
Compare
vy
reviewed
Mar 28, 2024
...rc/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutProperties.java
Show resolved
Hide resolved
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces
PropertiesUtilwithPropertyEnvironmentin modules that depend on Log4j Core.It also ensures that every logger context has a different version of
PropertyEnvironment.Review kit
The most important changes are:
PropertyKeyimplementations in all modules (exceptlog4j-api). The new classes are calledCoreKeys,AsyncLoggerKeys, etc.*Keysclasses,SystemBundleis removed and service classes are registered programmatically.The changes in
log4j-apiandlog4j-api-testare transitional (until Log4j API 3.x is removed) and may be disregarded.