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

Reduce the noise in the "analysis.log" file that is sent to the server

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: Scanner
    • Labels:
      None

      Description

      For multi-module projects, it would be great to be a bit smarter and dump less information in the "analysis.log" file. Indeed, when dumping the settings, and because by definition modules inherit settings from their parent, we end up with a lot of redundant information. In the end:

      • this is not very readable
      • this takes useless space on server side (because this is dumped in the task log)

      When dumping the properties of a module, would be good to output only settings that are different from the parent's ones.

      Example: instead of having:

      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-maven-model
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.id=20160217220443
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.serverBaseURL=http://nemo.sonarsource.org
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.startTime=2016-02-17T22:04:43+0100
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-maven-model/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-maven-model/src/main/java
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-squid
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.id=20160217220443
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.serverBaseURL=http://nemo.sonarsource.org
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.startTime=2016-02-17T22:04:43+0100
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-squid/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-squid/src/main/java
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-checks-testkit
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.id=20160217220443
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.serverBaseURL=http://nemo.sonarsource.org
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.startTime=2016-02-17T22:04:43+0100
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-checks-testkit/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-checks-testkit/src/main/java

      , would be less verbose and more readable:

      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.id=20160217220443
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.serverBaseURL=http://nemo.sonarsource.org
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.core.startTime=2016-02-17T22:04:43+0100
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-maven-model
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-maven-model/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-maven-model/src/main/java
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-squid
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-squid/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-squid/src/main/java
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] Settings for module: org.sonarsource.java:java-checks-testkit
      2016.02.18 14:20:21 INFO [o.s.s.c.s.LogScannerContextStep] - sonar.sources=/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-checks-testkit/pom.xml,/scratch/jenkins/workspace/ZZZZ_SLAVE_SIZE_sqjava/java-checks-testkit/src/main/java

        Attachments

          Activity

            People

            Assignee:
            julien.henry Julien Henry
            Reporter:
            fabrice.bellingard Fabrice Bellingard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: