1 <?xml version="1.0" encoding="UTF-8" ?>
3 <configuration debug="false">
5 <!-- appender used when deploying Sonar WAR on a JEE server -->
6 <appender name="SONAR_WAR" class="ch.qos.logback.core.ConsoleAppender">
7 <!-- avoid to log 404 file not found messages from the rails file servlet -->
8 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
9 <evaluator name="mavenRepoFileNotFound">
10 <expression>message.startsWith("files: File not found: /maven")</expression>
12 <OnMismatch>NEUTRAL</OnMismatch>
13 <OnMatch>DENY</OnMatch>
15 <layout class="ch.qos.logback.classic.PatternLayout">
17 %d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
22 <!-- appender used when using sonar with the provided jetty web container -->
23 <appender name="SONAR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
24 <File>/var/log/sonar/sonar.log</File>
25 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
26 <param name="FileNamePattern" value="/var/log/sonar/sonar.%i.log"/>
27 <param name="MinIndex" value="1"/>
28 <param name="MaxIndex" value="3"/>
30 <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
31 <param name="MaxFileSize" value="5MB"/>
33 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
34 <evaluator name="mavenRepoFileNotFound">
35 <expression>message.startsWith("files: File not found: /maven")</expression>
37 <OnMismatch>NEUTRAL</OnMismatch>
38 <OnMatch>DENY</OnMatch>
40 <layout class="ch.qos.logback.classic.PatternLayout">
42 %d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
48 <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
49 <layout class="ch.qos.logback.classic.PatternLayout">
50 <Pattern>%d{yyyy.MM.dd HH:mm:ss} %-5level %X %msg%n</Pattern>
55 <!-- JRuby on Rails. Uncomment in order to log HTTP and SQL requests -->
56 <!--<logger name="rails">
57 <level value="DEBUG"/>
60 <logger name="org.hibernate.cache.ReadWriteCache">
61 <!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
62 <level value="ERROR"/>
64 <logger name="org.hibernate.cache.EhCacheProvider">
65 <!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuration)" message -->
66 <level value="ERROR"/>
69 <!-- set INFO to activate Hibernate SQL logs. NOT RECOMMENDED -->
70 <logger name="org.hibernate.SQL">
71 <level value="ERROR"/>
74 <!-- set INFO to activate Hibernate SQL statistics. NOT RECOMMENDED -->
75 <logger name="org.sonar.DBSTATISTICS">
76 <level value="ERROR"/>
79 <logger name="org.sonar.INFO">
83 <logger name="org.sonar.CONSOLE">
85 <appender-ref ref="CONSOLE"/>
90 <appender-ref ref="SONAR_FILE"/>