瀏覽代碼

SONAR-10662 updated docs to match wrapper behaviour

tags/8.6.0.39681
Tobias Trabelsi 3 年之前
父節點
當前提交
8ad3617044

+ 14
- 0
server/sonar-docs/src/pages/instance-administration/system-info.md 查看文件

@@ -45,6 +45,20 @@ To control log rolling, use the `sonar.log.rollingPolicy`

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

#### **Wrapper Config**

If Sonarqube was started using the SonarQube wrapper (for example, by using the provided start and stop scripts), the log rotation of the main Process (sonar.log) needs to be defined in the `wrapper.conf`.
By Default, the wrapper will rotate the `sonar.log` file each day if there is new content to be logged.

The log rotation in the wrapper can be fine-tuned with the following properties:

* **`wrapper.logfile.maxsize=value[m for mb, k for kb]`**
* **`wrapper.logfile.maxfiles=value`**
* **`wrapper.logfile.rollmode=DATE|SIZE`**

`wrapper.logfile.maxsize` and `wrapper.logfile.maxfiles` are only considered if `wrapper.logfile.rollmode` is set to `SIZE`.
For `wrapper.logfile.rollmode=DATE` to work properly, the file defined with the property `wrapper.logfile` needs to include a "YYYYMMDD" Token.

### UI Access to Logs and Log Levels

The System Info page gives you the ability to download your instance's current log files (log files rotate on a regular basis), and to tune the log level via controls at the top of the page. Changes made here are temporary, and last only until the next time the instance is restarted, at which point the level will be reset to the more permanent value set in _$SONARQUBE-HOME/conf/sonar.properties_. Regardless, if you change your log level _from_ `INFO`, but sure to change it back as soon as is practical; log files can get very large very quickly at lower log levels.

+ 2
- 1
sonar-application/src/main/assembly/conf/sonar.properties 查看文件

@@ -327,8 +327,9 @@
# Compute Engine (aka. CE) logs in ce.log
# Elasticsearch (aka. ES) logs in es.log
#
# All 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies
# Depending on the startup, all 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies
# individually (eg. if sonar.log.maxFiles=4, there can be at most 4 of each files, ie. 16 files in total).
# If the SonarQube wrapper is used (for example, with the provided start.sh script), the sonar.log rotation policy needs to be set in the wrapper.conf
#
# All 4 files have logs in the same format:
# 1 2 3 4 5 6

+ 2
- 1
sonar-application/src/main/assembly/conf/wrapper.conf 查看文件

@@ -29,9 +29,10 @@ wrapper.java.maxmemory=32

wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=../../logs/sonar.log
wrapper.logfile.format=M
wrapper.logfile.loglevel=INFO
wrapper.logfile.rollmode=DATE
wrapper.logfile=../../logs/sonar-YYYYMMDD.log

# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value

Loading…
取消
儲存