-
Notifications
You must be signed in to change notification settings - Fork 12
/
logback-spring.xml
79 lines (68 loc) · 2.75 KB
/
logback-spring.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration debug="true">
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder" />
<import class="ch.qos.logback.core.ConsoleAppender" />
<import class="ch.qos.logback.core.rolling.RollingFileAppender" />
<property name="LOG_DIR" value="./logs" />
<appender name="CONSOLE" class="ConsoleAppender">
<encoder class="PatternLayoutEncoder">
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}] %p %c: %m%n</pattern>
</encoder>
</appender>
<appender name="ANET" class="RollingFileAppender">
<file>${LOG_DIR}/anet.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/anet-%d.log.zip</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
<encoder class="PatternLayoutEncoder">
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}] %p %c: %m%n</pattern>
</encoder>
</appender>
<appender name="AUDIT" class="RollingFileAppender">
<file>${LOG_DIR}/auditLogger.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/auditLogger-%d.log.zip</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
<encoder class="PatternLayoutEncoder">
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}] %p %c: %m%n</pattern>
</encoder>
</appender>
<appender name="CLIENT" class="RollingFileAppender">
<file>${LOG_DIR}/clientLog.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/clientLog-%d.log.zip</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
<encoder class="PatternLayoutEncoder">
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}] %p %c: %m%n</pattern>
</encoder>
</appender>
<appender name="DB" class="RollingFileAppender">
<file>${LOG_DIR}/dbLog.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/dbLog-%d.log.zip</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
<encoder class="PatternLayoutEncoder">
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS,UTC}]\t%p\t%c:\t%m%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
<logger name="mil.dds.anet" level="DEBUG">
<appender-ref ref="ANET" />
</logger>
<logger name="mil.dds.anet.utils.AnetAuditLogger" level="INFO">
<appender-ref ref="AUDIT" />
</logger>
<logger name="mil.dds.anet.resources.LoggingResource" level="TRACE">
<appender-ref ref="CLIENT" />
</logger>
<logger name="mil.dds.anet.utils.AnetDbLogger" level="TRACE">
<appender-ref ref="DB" />
</logger>
</configuration>