Skip to content

Conversation

rocketraman
Copy link
Member

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 #136

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

fun getKey(): Int = logger.runInTrace {
Random().nextInt(10)
Random.nextInt(10)

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.

@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

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

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"?

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.

Remove logger property
2 participants