Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
The Kotlin compiler API can be used to create compiler plugins that can do the same kinds of things as Scala macros.
It would be interesting to (optionally) support this kind of compiler plugin for the Kotlin logger API, allowing log messages to be written very simply with just String interpolation and without lambdas as the current API uses, but via the compiler plugin these remain efficient.
The compiler plugin could do things like gate the logger call / string interpolation based on the logger enabled status and strip out certain logger calls in production code (but leave them in dev code). There may be other possibilities as well.