/
logback.xml
42 lines (35 loc) · 1.64 KB
/
logback.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- The Werminal logback configuration. -->
<configuration debug="false">
<!-- The logs directory can be set at startup using -Dlogging.dir=... If
not specified the logging directory will be the value specified below. -->
<if condition='isNull("logging.dir")'>
<then>
<property name="logging.dir" value="./logs"/>
</then>
</if>
<!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender -->
<appender name="WRML_LOG"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<!-- %rEx... prints exception causes in REVERSE order: http://nurkiewicz.blogspot.com/2011/09/logging-exceptions-root-cause-first.html -->
<pattern>
<![CDATA[%-32(%date [%.8thread]) %-5level %-128(%-32(%replace(%logger{1}){'^org\.wrml.*\.',''}) - %msg) %n%rEx]]></pattern>
</encoder>
<File>${logging.dir}/wrml.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${logging.dir}/wrml.%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>7</MaxHistory>
</rollingPolicy>
</appender>
<!-- org.wrml loggers first -->
<logger name="org.wrml" level="DEBUG"/>
<!-- third party loggers last, lexicographically -->
<logger name="org.apache" level="WARN"/>
<logger name="org.apache.cxf" level="WARN"/>
<logger name="org.apache.http" level="WARN"/>
<logger name="org.eclipse.jetty" level="WARN"/>
<root level="DEBUG">
<appender-ref ref="WRML_LOG"/>
</root>
</configuration>