sschuberth commented on issue #136: URL: https://github.com/apache/logging-log4j-kotlin/issues/136#issuecomment-3338818533
> @sschuberth are you a user of this property? Yes, we heavily use it throughout the code base of https://github.com/oss-review-toolkit/ort. > Would you be opposed to its renaming and/or removal and if so, can you explain why? Yes, I would. While renaming would be somewhat feasible in the sense that search & replace is easy, I dislike a non-readable name like `_logger`. > Would using the `Logger` interface explicitly be an acceptable alternative? Not really, as for me it's the opposite of your "I prefer client code to be more explicit about loggers" statement from above: IMO logging should be available by default everywhere, to ease and encourage making use of it. Classes should not need to "implement" an interface just to *do* logging, as that seems to violate best practices by introducing tight coupling for something that's not really a capability of the implementing class. To me, convenience outweighs performance matters here. Also, do your numbers take the caching done by `cachedLoggerOf()` into account? Would inlining that function help? Generally, if people for whatever reason want ```kotlin companion object { private val logger = logger() } ``` they could simply use a FQN like ```kotlin companion object { private val logger = org.apache.logging.log4j.kotlin.logger("name") } ``` and not import `org.apache.logging.log4j.kotlin.logger`, no? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
