aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-04-15 17:24:47 +0200
committersonartech <sonartech@sonarsource.com>2024-04-16 20:02:44 +0000
commit7d34cae4f05ee345ff72d3b8028d6fec2056b336 (patch)
tree8f5a29d83a94b00da196746f18692294d17f2dc9 /sonar-scanner-engine
parente998cf08be868e580b248b053f4fa06555d221e2 (diff)
downloadsonarqube-7d34cae4f05ee345ff72d3b8028d6fec2056b336.tar.gz
sonarqube-7d34cae4f05ee345ff72d3b8028d6fec2056b336.zip
SONAR-22036 Fix logback initialization for old bootstrappers
Because of https://jira.qos.ch/browse/LOGBACK-1537 it is not possible to use an include + configuring Logback manually via classpath loading without having very verbose logs appearing at startup. Duplicated the shared content in each log config file to fix the issue.
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/resources/logback-shared.xml16
-rw-r--r--sonar-scanner-engine/src/main/resources/logback.xml17
-rw-r--r--sonar-scanner-engine/src/main/resources/org/sonar/batch/bootstrapper/logback.xml16
3 files changed, 29 insertions, 20 deletions
diff --git a/sonar-scanner-engine/src/main/resources/logback-shared.xml b/sonar-scanner-engine/src/main/resources/logback-shared.xml
deleted file mode 100644
index 83d49028733..00000000000
--- a/sonar-scanner-engine/src/main/resources/logback-shared.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- This file is shared between the old bootstrapping entry point and new bootstrapping -->
-<included>
- <!-- BeanUtils generate too many DEBUG logs when sonar.verbose is set -->
- <logger name="org.apache.commons.beanutils.converters" level="WARN"/>
-
- <!-- FileSnapshot generate too many DEBUG logs when sonar.verbose is set -->
- <logger name="org.eclipse.jgit.internal.storage.file" level="INFO"/>
-
- <!-- Spring generates too many DEBUG logs when sonar.verbose is set -->
- <logger name="org.springframework" level="INFO"/>
-
- <!-- AbstractApplicationContext generate too verbose warning if warn is Enabled -->
- <logger name="org.springframework.context.annotation.AnnotationConfigApplicationContext" level="ERROR"/>
-
- <logger name="org.sonar.core.platform.PriorityBeanFactory" level="INFO"/>
-</included>
diff --git a/sonar-scanner-engine/src/main/resources/logback.xml b/sonar-scanner-engine/src/main/resources/logback.xml
index 4080ae54558..c64f28abec7 100644
--- a/sonar-scanner-engine/src/main/resources/logback.xml
+++ b/sonar-scanner-engine/src/main/resources/logback.xml
@@ -2,9 +2,8 @@
<!DOCTYPE configuration>
<!-- This logback configuration is used when the scanner engine is bootstrapped using the SonarScannerCli class. -->
-<configuration>
+<configuration scan="false">
<import class="ch.qos.logback.core.ConsoleAppender"/>
- <include resource="logback-shared.xml"/>
<appender name="STDOUT" class="ConsoleAppender">
<encoder class="org.sonar.scanner.bootstrap.ScannerLogbackEncoder"/>
@@ -13,4 +12,18 @@
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
+
+ <!-- BeanUtils generate too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.apache.commons.beanutils.converters" level="WARN"/>
+
+ <!-- FileSnapshot generate too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.eclipse.jgit.internal.storage.file" level="INFO"/>
+
+ <!-- Spring generates too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.springframework" level="INFO"/>
+
+ <!-- AbstractApplicationContext generate too verbose warning if warn is Enabled -->
+ <logger name="org.springframework.context.annotation.AnnotationConfigApplicationContext" level="ERROR"/>
+
+ <logger name="org.sonar.core.platform.PriorityBeanFactory" level="INFO"/>
</configuration> \ No newline at end of file
diff --git a/sonar-scanner-engine/src/main/resources/org/sonar/batch/bootstrapper/logback.xml b/sonar-scanner-engine/src/main/resources/org/sonar/batch/bootstrapper/logback.xml
index 65b12b2ed24..ccf804462b6 100644
--- a/sonar-scanner-engine/src/main/resources/org/sonar/batch/bootstrapper/logback.xml
+++ b/sonar-scanner-engine/src/main/resources/org/sonar/batch/bootstrapper/logback.xml
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration debug="false">
- <include resource="logback-shared.xml"/>
-
<!--
This file is loaded by bootstrappers like Ant Task and Java Runner.
@@ -24,4 +22,18 @@
<appender-ref ref="STDOUT"/>
</root>
+ <!-- BeanUtils generate too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.apache.commons.beanutils.converters" level="WARN"/>
+
+ <!-- FileSnapshot generate too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.eclipse.jgit.internal.storage.file" level="INFO"/>
+
+ <!-- Spring generates too many DEBUG logs when sonar.verbose is set -->
+ <logger name="org.springframework" level="INFO"/>
+
+ <!-- AbstractApplicationContext generate too verbose warning if warn is Enabled -->
+ <logger name="org.springframework.context.annotation.AnnotationConfigApplicationContext" level="ERROR"/>
+
+ <logger name="org.sonar.core.platform.PriorityBeanFactory" level="INFO"/>
+
</configuration>