-
Notifications
You must be signed in to change notification settings - Fork 5
/
logback.xml
71 lines (63 loc) · 2.71 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
66
67
68
69
70
71
<?xml version="1.0" encoding="UTF-8"?>
<!-- scan this file for configuration changes every minute -->
<!-- change the scan period with: <configuration scan="true" scanPeriod="30 seconds" > -->
<configuration scan="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{ISO8601} %-5p [%-4.15t] %-40.60c - %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<appender name="CONSOLE-stats" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{ISO8601} %-5p [%-4.15t] %-40.60c - %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<property name="LOG_DIR" value="./logs" />
<appender name="STATS-FILE-ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/agent_event_stats.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/agent_event_stats.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<!-- each archived file, size max 10MB -->
<maxFileSize>10MB</maxFileSize>
<!-- total size of all archive files, if total size > 1GB, it will delete old archived file -->
<totalSizeCap>1GB</totalSizeCap>
<!-- 60 days to keep -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{ISO8601} %-5p [%-4.15t] %-40.60c - %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<appender name="EVENTS-FILE-ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/agent_events.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/agent_events.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<!-- each archived file, size max 10MB -->
<maxFileSize>10MB</maxFileSize>
<!-- total size of all archive files, if total size > 1GB, it will delete old archived file -->
<totalSizeCap>1GB</totalSizeCap>
<!-- 60 days to keep -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{ISO8601} %-5p [%-4.15t] %-40.60c - %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<logger name="com.sas" level="INFO"/>
<logger name="org.apache" level="INFO"/>
<logger name="com.sas.ci360" level="INFO"/>
<logger name="CustomAgent.stats" level="DEBUG">
<appender-ref ref="STATS-FILE-ROLLING" />
</logger>
<logger name="CustomAgent.events" level="INFO">
<appender-ref ref="EVENTS-FILE-ROLLING" />
</logger>
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="EVENTS-FILE-ROLLING" />
</root>
</configuration>