-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add PropertyEnvironment to log4j-kit
#2307
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
2dc9115 to
1138990
Compare
9 tasks
3f902c5 to
7458a12
Compare
This PR creates a simplified version of `PropertyEnvironment` in `log4j-sdk` that supports Spring-like property classes. It provides aggregation features to allow the conversion of multiple properties at once in a typesafe way.
7458a12 to
f6825d2
Compare
Base automatically changed from
fix/move-abstractlogger
to
feature/log4j-sdk
February 29, 2024 15:14
Adds support for: * default values, * boxed values, * `Level` properties, * `char[]` (e.g. password) properties.
vy
reviewed
Mar 2, 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.
I think this is a really good start! There are certain things I don't agree with, though I really liked the direction where this is going. 💯
log4j-kit/src/main/java/org/apache/logging/log4j/kit/env/Log4jProperty.java
Outdated
Show resolved
Hide resolved
log4j-kit/src/main/java/org/apache/logging/log4j/kit/env/PropertySource.java
Show resolved
Hide resolved
...rc/main/java/org/apache/logging/log4j/kit/env/internal/ContextEnvironmentPropertySource.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/logging/log4j/kit/env/internal/ContextEnvironmentPropertySource.java
Outdated
Show resolved
Hide resolved
log4j-kit/src/main/java/org/apache/logging/log4j/kit/env/internal/CopyOnWriteNavigableSet.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/logging/log4j/kit/env/support/PropertySourcePropertyEnvironment.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/logging/log4j/kit/env/support/PropertySourcePropertyEnvironment.java
Outdated
Show resolved
Hide resolved
...kit/src/test/java/org/apache/logging/log4j/kit/env/support/BasicPropertyEnvironmentTest.java
Show resolved
Hide resolved
...kit/src/test/java/org/apache/logging/log4j/kit/env/support/BasicPropertyEnvironmentTest.java
Show resolved
Hide resolved
log4j-kit/src/test/java/org/apache/logging/log4j/kit/logger/TestListLogger.java
Show resolved
Hide resolved
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
PropertyEnvironment to log4j-sdkPropertyEnvironment to log4j-kit
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 PR creates a simplified version of
PropertyEnvironmentinlog4j-sdkthat supports Spring-like property classes.It provides aggregation features to allow the conversion of multiple properties at once in a typesafe way.
This is based on #2291 and part of #2290.
The main functionality of
PropertyEnvironmentis to replace a set of properties with keys "Configuration.file", "Configuration.factory", "Configuration.timeout" into a Java record: