-
Notifications
You must be signed in to change notification settings - Fork 7
/
logback.xml
65 lines (63 loc) · 3.51 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE logback>
<!-- _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ -->
<!-- Harbor logging settings for All Environments -->
<!-- _/_/_/_/_/_/_/_/_/_/ -->
<configuration>
<property resource="harbor_env.properties" />
<property resource="harbor_env_${lasta.env}.properties" />
<property name="domain.name" value="harbor"/>
<property name="log.level" value="${log.level:-debug}"/>
<property name="log.pattern" value="%d [%t] %-5p \\(%C{0}@%M\\(\\):%L\\) - %m%n"/>
<property name="log.file.basedir" value="${log.file.basedir:-/tmp/lastaflute/undefinedbasedir}"/>
<property name="log.file.encoding" value="UTF-8"/>
<property name="backup.date.suffix" value="_%d{yyyyMMdd}"/>
<property name="backup.max.history" value="180"/>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder><charset>${log.file.encoding}</charset><pattern>${log.pattern}</pattern></encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>${log.console.level}</level></filter>
</appender>
<appender name="appfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${log.file.basedir}/app_${domain.name}.log</File>
<Append>true</Append>
<encoder><charset>${log.file.encoding}</charset><pattern>${log.pattern}</pattern></encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.file.basedir}/backup/app_${domain.name}${backup.date.suffix}.log</fileNamePattern>
<maxHistory>${backup.max.history}</maxHistory>
</rollingPolicy>
</appender>
<appender name="errorfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${log.file.basedir}/error_${domain.name}.log</File>
<Append>true</Append>
<encoder><charset>${log.file.encoding}</charset><pattern>${log.pattern}</pattern></encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>ERROR</level></filter>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.file.basedir}/backup/error_${domain.name}${backup.date.suffix}.log</fileNamePattern>
<maxHistory>${backup.max.history}</maxHistory>
</rollingPolicy>
</appender>
<appender name="mailfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${log.file.basedir}/mail_${domain.name}.log</File>
<Append>true</Append>
<encoder><charset>${log.file.encoding}</charset><pattern>${log.pattern}</pattern></encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.file.basedir}/backup/mail_${domain.name}${backup.date.suffix}.log</fileNamePattern>
<maxHistory>${backup.max.history}</maxHistory>
</rollingPolicy>
</appender>
<logger name="org.dbflute" additivity="false" level="${log.level}">
<appender-ref ref="console"/><appender-ref ref="appfile"/><appender-ref ref="errorfile"/>
</logger>
<logger name="org.lastaflute" additivity="false" level="${log.level}">
<appender-ref ref="console"/><appender-ref ref="appfile"/><appender-ref ref="errorfile"/>
</logger>
<logger name="org.docksidestage" additivity="false" level="${log.level}">
<appender-ref ref="console"/><appender-ref ref="appfile"/><appender-ref ref="errorfile"/>
</logger>
<logger name="mailflute.sending" additivity="false" level="${log.level}">
<appender-ref ref="mailfile"/>
</logger>
<root level="error">
<appender-ref ref="console"/><appender-ref ref="errorfile"/>
</root>
</configuration>