blob: 1c36ddc015ab733069e770a4e000dd1c59b862f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
<?xml version="1.0" encoding="UTF-8" ?>
<configuration debug="false">
<appender name="SONAR_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"/>
<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">
<pattern>
%d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
</pattern>
</encoder>
</appender>
<!-- appender used to profile Sonar Server -->
<appender name="PROFILING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${SONAR_HOME}/logs/profiling.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<param name="FileNamePattern" value="${SONAR_HOME}/logs/profiling.%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">
<pattern>
%d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
</pattern>
</encoder>
</appender>
<!-- Display Rails warnings and errors in the standard Sonar log -->
<logger name="rails" additivity="false">
<level value="WARN"/>
<appender-ref ref="SONAR_FILE"/>
</logger>
<!--
Profiling of HTTP and SQL requests in Rails:
<logger name="rails" additivity="false">
<level value="DEBUG"/>
<appender-ref ref="PROFILING_FILE"/>
</logger>
Example of command-line to get the HTTP requests with execution time greater than 10s :
grep 'rails Completed in [0-9]\{5,\}ms' < profiling.log
-->
<logger name="org.hibernate.cache.ReadWriteCache">
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
<level value="ERROR"/>
</logger>
<logger name="org.hibernate.cache.EhCacheProvider">
<!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuration)" message -->
<level value="ERROR"/>
</logger>
<logger name="org.hibernate">
<level value="WARN"/>
</logger>
<!-- Display SQL requests and results by setting the following loggers to level DEBUG -->
<logger name="org.hibernate.SQL">
<level value="WARN"/>
</logger>
<logger name="org.apache.ibatis">
<level value="WARN"/>
</logger>
<logger name="java.sql">
<level value="WARN"/>
</logger>
<logger name="java.sql.ResultSet">
<level value="WARN"/>
</logger>
<root>
<level value="INFO"/>
<appender-ref ref="SONAR_FILE"/>
</root>
</configuration>
|