-
Notifications
You must be signed in to change notification settings - Fork 13
Move logger property to autoprop package
#137
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
base: main
Are you sure you want to change the base?
Move logger property to autoprop package
#137
Conversation
|
|
||
| fun getKey(): Int = logger.runInTrace { | ||
| Random().nextInt(10) | ||
| Random.nextInt(10) |
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 (and line 22) should go to a separate commit with a separate rationale in the commit message IMO.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| * Simply import this property and use it. | ||
| * | ||
| * ``` | ||
| * import org.apache.logging.log4j.kotlin.autoprop.logger |
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 should now say org.apache.logging.log4j.kotlin.extension.logger as well.
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.
Oops, fixed
| */ | ||
| @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should now say org.apache.logging.log4j.kotlin.extension.logger as well.
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.
Both lines, actually.
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
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