Skip to end of metadata
Go to start of metadata

Server-side logging is controlled by properties set in $SONARQUBE_HOME/conf/sonar.properties.

Log level

The server-side log level can be customized via the sonar.log.level property. Supported values are

  • INFO (default)
  • DEBUG - for advanced logs.
  • TRACE - show advanced logs and all SQL and Elasticsearch requests. It slows down the server environment, and should be used only for tracking web request performance problems.

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.

Other logs

In addition to the log files created in $SONARQUBE_HOME/logs, background task logs are created in the $SONARQUBE_HOME/data/ce/logs directory. One subdirectory will be created for each project, developer, and view in the instance. These subdirectories will be organized by type (for instance data/ce/logs/PROJECT/...). Each directory will contain up to 10 log files (this is configurable in Administration > General > General), and with default logging settings the log files are typically no larger than 10kb. Other logs may be created as well.

  • No labels