Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2474

Optional support for the Kotlin compiler API / plugin in the Kotlin logger API

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Kotlin API

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rocketraman Raman Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: