This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
10.4 | Instance administration | Server logs and system info

Server logs, Server ID, and system info

On this page

Viewing your system Info

The System Info page is found at Administration > System. It gives you access to detailed information on the state of your SonarQube instance.

You can browse details about your running instance on this page.

Downloading your system info

If you have a support contract, you might be asked by a support representative to send in your system info, which can be downloaded using the Download System Info button at the top.

Getting your Server ID

If you want to switch to a paid SonarQube edition, you will be asked by your sales representative to send in your Server ID.

Your server ID can be found at the top of the page Administration > System.

If you’re running a commercial instance, you can also find this value on the License page (Administration > Configuration > License Manager)

Viewing the server logs

The following log files are created (log files rotate on a regular basis): 

  • One per SonarQube process.
  • The access log.
  • The deprecation log which stores the Web API requests that use deprecated Web API endpoints or parameters.

If you have a support contract, you can download your instance's current log files from the UI. To do so:

  • Go to Administration > System and click Download logs in the top right corner.

Setting up the server-side logging

Server-side logging is controlled by properties set in <sonarqubeHome>/conf/sonar.properties. The standard output of SonarQube logs can be converted to JSON with the environment variable SONAR_LOG_JSONOUTPUT=true. A configuration of the log format is currently not possible.

Log level

The server-side log level can be customized via the sonar.log.level property  in <sonarqubeHome>/conf/sonar.properties. Supported values are:

  • INFO: The default.
  • DEBUG: For advanced logs. Starting from this log level, some personal user information can be logged.
  • TRACE: Show advanced logs and all SQL and ElasticSearch requests. TRACE level logging slows down the server environment, and should be used only for tracking web request performance problems.

Log level by process

The server-side log level can be adjusted more precisely for the four processes of SonarQube server via the following properties:

  • sonar.log.level.app: for the Main process of SonarQube (aka WrapperSimpleApp, the bootstrapper process starting the 3 others)
  • sonar.log.level.web: for the WebServer
  • sonar.log.level.ce: for the ComputeEngineServer
  • sonar.log.level.es: for the SearchServer

Log rotation

To control log rolling, use the sonar.log.rollingPolicy.

  • time:[value]: for time-based rotation. For example, use time:yyyy-MM-dd for daily rotation, and time:yyyy-MM for monthly rotation.
  • size:[value]: for size-based rotation. For example, size:10MB.
  • none: for no rotation. Typically this would be used when logs are handled by an external system like logrotate.

sonar.log.maxFiles is the maximum number of files to keep. This property is ignored if sonar.log.rollingPolicy=none.

Retrieving the total Lines of Code (LOC)

The number of Lines of Code (for licensing purposes) in an instance can be found in the System section of the System Info page and on the License page (Administration > Configuration > License Manager) in commercial editions.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License