From bf3c0236036a6ef3f13223dce54db3a2cbb7781a Mon Sep 17 00:00:00 2001
From: Stephane Gamard <stephane.gamard@searchbox.com>
Date: Tue, 22 Jul 2014 10:50:31 +0200
Subject: Each application logs into its own file.

---
 sonar-application/src/main/resources/logback.xml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'sonar-application/src')

diff --git a/sonar-application/src/main/resources/logback.xml b/sonar-application/src/main/resources/logback.xml
index 067d353bdd5..5a19d946cd5 100644
--- a/sonar-application/src/main/resources/logback.xml
+++ b/sonar-application/src/main/resources/logback.xml
@@ -9,7 +9,7 @@
 <configuration debug="false">
   <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>
 
-  <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+  <appender name="FILE" 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"/>
@@ -28,6 +28,11 @@
   </appender>
 
   <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+    <filter class="ch.qos.logback.classic.filter.LevelFilter">
+      <level>INFO</level>
+      <onMatch>ACCEPT</onMatch>
+      <onMismatch>DENY</onMismatch>
+    </filter>
     <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
       <pattern>
         %d{yyyy.MM.dd HH:mm:ss} %-5level %msg%n
@@ -35,8 +40,8 @@
     </encoder>
   </appender>
 
+
   <logger name="console" additivity="false">
-    <level value="INFO"/>
     <appender-ref ref="CONSOLE"/>
   </logger>
 
@@ -50,9 +55,8 @@
 
   <root>
     <level value="DEBUG"/>
+    <appender-ref ref="FILE"/>
     <appender-ref ref="CONSOLE"/>
-    <appender-ref ref="LOGFILE"/>
   </root>
 
-
 </configuration>
-- 
cgit v1.2.3