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

Replace conf/logback.xml by settings in conf/sonar.properties

    XMLWordPrintable

    Details

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

      Description

      Logback is an internal technical layer. For this reason it should not be available to end-users.

      To keep the configuration simple, only 1 property must be available on server-side :

      • sonar.log.profilingLevel=NONE|BASIC|FULL (default is NONE). Profiling logs are enabled when BASIC or FULL.

      Profiling logs are appended to standard logs (logs/sonar.log). They are displayed when ending a processing, with execution time and sometimes number of results or contextual information.

      Example when sonar.log.profilingLevel=BASIC

      2013.10.29 13:06:20 INFO thread-3 [authorization]   3ms
      2013.10.29 13:06:20 INFO thread-3 [measures     ] 25ms [qualifiers=FIL,PRJ | ncloc>10] 125 results
      2013.10.29 13:06:20 INFO thread-3 [http         ] 32ms GET /measures/search?filter=2
      

      Example when sonar.log.profilingLevel=FULL

      2013.10.29 13:06:20 INFO thread-3 [sql          ] 1ms 1results SELECT * FROM USERS WHERE LOGIN=? | sbrandhof
      2013.10.29 13:06:20 INFO thread-3 [sql          ] 2ms 20results SELECT * FROM PERMISSIONS WHERE USER_ID=? | 4
      2013.10.29 13:06:20 INFO thread-3 [authorization] 3ms
      2013.10.29 13:06:20 INFO thread-3 [es           ] 18ms 1results search docs measures {match: {all()}, filter: {term:{foo: bar}}}
      2013.10.29 13:06:20 INFO thread-3 [measures     ] 25ms 125results [qualifiers=FIL,PRJ | ncloc>10]
      2013.10.29 13:06:20 INFO thread-3 [http         ] 32ms GET /measures/search?filter=2
      

      This ticket does not include ElasticSearch logs in FULL profiling level.
      This ticket includes:

      • printing SQL requests and results in FULL mode (replaces sonar.showSql and sonar.showSqlResults)
      • activating Rails logs in FULL mode (previously "rails" logger in DEBUG)
      • updating MeasureFilter and H2 DB export (for "Preview") to use this property:
        • MeasureFilter => BASIC w/o SQL request
        • H2 DB Export => BASIC

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jb.lievremont OLD - Jean-Baptiste Lièvremont (Inactive)
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: