Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8567

Improve logging API to accept a lambda as argument

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3
    • Component/s: Plugin API
    • Labels:

      Description

      Like for JDK logging API we could benefit from lambda to lazy initialize arguments.

        LOG.debug(() -> "A very" + costly.operation());
      

      This is only useful for trace and debug levels since info/warn/error are always displayed

        Attachments

          Activity

            People

            Assignee:
            julien.henry Julien Henry
            Reporter:
            julien.henry Julien Henry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: