Move logger property to autoprop package#137
Open
rocketraman wants to merge 1 commit intoapache:mainfrom
Open
Conversation
sschuberth
reviewed
Sep 26, 2025
|
|
||
| fun getKey(): Int = logger.runInTrace { | ||
| Random().nextInt(10) | ||
| Random.nextInt(10) |
There was a problem hiding this comment.
This (and line 22) should go to a separate commit with a separate rationale in the commit message IMO.
Member
Author
There was a problem hiding this comment.
Agreed, I'll revert this unrelated change.
| @Deprecated( | ||
| "Replace with autoprop.logger to avoid unintended consequences with explicitly declared logger properties. This will be removed in the next major release.", | ||
| replaceWith = ReplaceWith("logger", "org.apache.logging.log4j.kotlin.autoprop.logger"), | ||
| level = DeprecationLevel.WARNING |
There was a problem hiding this comment.
WARNING is the default and can be dropped.
| @@ -0,0 +1,27 @@ | |||
| package org.apache.logging.log4j.kotlin.autoprop | |||
There was a problem hiding this comment.
Note auto about the package name... "auto" sounds like more magic than there actually is. It's just a regular extension property. So maybe call the package "extension"?
f0195c5 to
b64b0f2
Compare
b64b0f2 to
db0053f
Compare
sschuberth
suggested changes
Sep 30, 2025
| * Simply import this property and use it. | ||
| * | ||
| * ``` | ||
| * import org.apache.logging.log4j.kotlin.autoprop.logger |
There was a problem hiding this comment.
This should now say org.apache.logging.log4j.kotlin.extension.logger as well.
| */ | ||
| @Deprecated( | ||
| "Replace with autoprop.logger to avoid unintended consequences with explicitly declared logger properties. This will be removed in the next major release.", | ||
| replaceWith = ReplaceWith("logger", "org.apache.logging.log4j.kotlin.autoprop.logger") |
There was a problem hiding this comment.
This should now say org.apache.logging.log4j.kotlin.extension.logger as well.
The `logger` property conflicts with explicitly defined logger properties. Given the performance considerations of the `logger` property, move it to a separate package so imports of it are explicit and non-conflicting. Resolves apache#136
db0053f to
e116cf7
Compare
sschuberth
approved these changes
Sep 30, 2025
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
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.
The
loggerproperty conflicts with explicitly defined logger properties. Given the performance considerations of theloggerproperty, move it to a separate package so imports of it are explicit and non-conflicting.Resolves #136