aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2013-12-02 10:00:00 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2013-12-02 15:54:24 +0100
commitf79985eabb09cd91a2f6e0ff544a677afca63b0d (patch)
treed28e2a8b602e5089b3d00e6edb6b87b49ccde8a2 /sonar-application/src
parent5b589e7dafef7897ac8df900ff4094d969ebe75d (diff)
downloadsonarqube-f79985eabb09cd91a2f6e0ff544a677afca63b0d.tar.gz
sonarqube-f79985eabb09cd91a2f6e0ff544a677afca63b0d.zip
SONAR-4756 Silence default logger before proper logging configuration is loaded
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/main/resources/logback.xml43
1 files changed, 43 insertions, 0 deletions
diff --git a/sonar-application/src/main/resources/logback.xml b/sonar-application/src/main/resources/logback.xml
new file mode 100644
index 00000000000..efdbecacc62
--- /dev/null
+++ b/sonar-application/src/main/resources/logback.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ Configuration for default logger. Only used while embedded server is starting,
+ before proper logging configuration is loaded.
+
+ See http://logback.qos.ch/manual/configuration.html
+-->
+<configuration debug="false">
+ <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>
+
+ <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <File>${SONAR_HOME}/logs/sonar.log</File>
+ <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+ <param name="FileNamePattern" value="${SONAR_HOME}/logs/sonar.%i.log"/>
+ <param name="MinIndex" value="1"/>
+ <param name="MaxIndex" value="3"/>
+ </rollingPolicy>
+ <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+ <param name="MaxFileSize" value="5MB"/>
+ </triggeringPolicy>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <!-- Use %d{yyyy.MM.dd HH:mm:ss.SSS} to display milliseconds -->
+ <pattern>
+ %d{yyyy.MM.dd HH:mm:ss} %-5level %thread [%logger{20}] %X %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>
+ %d{yyyy.MM.dd HH:mm:ss} %-5level %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</configuration>