sschuberth opened a new issue, #139: URL: https://github.com/apache/logging-log4j-kotlin/issues/139
As discussed [here](https://github.com/apache/logging-log4j-kotlin/issues/136#issuecomment-3352105291) with @rocketraman, another possibility to solve both the "auto-pollution" of any class with a `logger` property and the performance hit introduced by getting a cached logger instance could be to provide a KSP-based compiler plugin that auto-generates code for annotated classes. It could work a bit similar to projects like [this](https://github.com/darkxanter/kdatamapper) which auto-generate extension functions for annotated classes. A difference would be that instead of an extension *function* a *property* is generated. As the property is generated at compile-time, it can hard-code the class / logger name, avoiding the need to look up a cached logger for a specific class. To avoid each instance of a class to get its own logger property, probably some more logic needs to be added to statically add the property to a (dummy) companion object instead. -- 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]
