This repository was archived by the owner on Jan 9, 2024. It is now read-only.
File tree 1 file changed +17
-6
lines changed
domain/src/main/resources
1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <! DOCTYPE xml >
3
- <configuration status =" debug " monitorInterval =" 30" >
2
+
3
+ <configuration status =" info " monitorInterval =" 30" >
4
4
<!-- 先定义所有的appender -->
5
5
<appenders >
6
6
<!-- 这个输出控制台的配置 -->
11
11
</Console >
12
12
13
13
<!-- 这个会打印出所有的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档 -->
14
- <RollingFile name =" RollingFile" fileName =" ${sys:user.home}/.prettyZoo/pretty .log"
14
+ <RollingFile name =" RollingFile" fileName =" ${sys:user.home}/.prettyZoo/log/prettyZoo .log"
15
15
filePattern =" ${sys:user.home}/.prettyZoo/prettyZoo.%d{yyyy-MM-dd}.log" >
16
16
<PatternLayout pattern =" [%d{yyyy-MM-dd 'at' HH:mm:ss z}] [%-5p] %l - %m%n" />
17
- <TimeBasedTriggeringPolicy interval =" 1" />
17
+ <policies >
18
+ <TimeBasedTriggeringPolicy />
19
+ <SizeBasedTriggeringPolicy size =" 25 MB" />
20
+ </policies >
21
+ <DefaultRolloverStrategy max =" 3" >
22
+ <Delete basePath =" ${sys:user.home}/.prettyZoo/log/" maxDepth =" 1" >
23
+ <IfFileName glob =" prettyZoo.*.log" />
24
+ </Delete >
25
+ <!-- 兼容旧的日志文件 -->
26
+ <Delete basePath =" ${sys:user.home}/.prettyZoo/" maxDepth =" 1" >
27
+ <IfFileName glob =" prettyZoo.*.log" />
28
+ </Delete >
29
+ </DefaultRolloverStrategy >
18
30
</RollingFile >
19
31
</appenders >
20
32
21
33
<loggers >
22
- <logger name =" cc.cc1234.main" level =" DEBUG " ></ logger >
34
+ <logger name =" cc.cc1234.main" level =" INFO " / >
23
35
<!-- 建立一个默认的root的logger -->
24
36
<root level =" INFO" >
25
37
<appender-ref ref =" RollingFile" />
26
38
<appender-ref ref =" Console" />
27
39
</root >
28
-
29
40
</loggers >
30
41
</configuration >
You can’t perform that action at this time.
0 commit comments