blob: 4c53061ff17c6c41e19784c3091ee696c8ccd0aa (
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
|
<configuration debug="true">
<contextName>HelloWorld</contextName>
<property resource="Application.properties" />
<property name="LOG_LEVEL" value="INFO" />
<property name="LOG_REF" value="FILE" />
<property name="LOG_FILE" value="${app.logfile}" />
<property name="LOG_PATTERN" value="%contextName %date{ISO8601} [%-5level %thread] [%file:%line] - %msg%n" />
<if condition='property("app.env").contains("DEV")'>
<then>
<property name="LOG_LEVEL" value="DEBUG" />
</then>
</if>
<if condition='isDefined("TEST_DB")'>
<then>
<property name="LOG_LEVEL" value="DEBUG" />
<property name="LOG_REF" value="FILE" />
<property name="LOG_FILE" value="./tests/logs" />
</then>
</if>
<if condition='isDefined("TEST_PDF")'>
<then>
<property name="LOG_LEVEL" value="DEBUG" />
<property name="LOG_REF" value="STDOUT" />
</then>
</if>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${LOG_FILE}</file>
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<root level="${LOG_LEVEL}">
<appender-ref ref="${LOG_REF}" />
</root>
</configuration>
|