fix: modify the log4j2.xml
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
</Console>
|
||||
|
||||
<!-- Info 日志文件,支持时间和大小滚动 -->
|
||||
<RollingFile name="InfoFile" fileName="${LOG_HOME}/app-info.log"
|
||||
filePattern="${LOG_HOME}/app-info-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<RollingFile name="InfoFile"
|
||||
fileName="${LOG_HOME}/app.log"
|
||||
filePattern="logs/%d{yyyy-MM-dd}/app-%i.log.gz">
|
||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||
|
||||
<Policies>
|
||||
@@ -27,8 +28,8 @@
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
</Policies>
|
||||
|
||||
<!-- 最多保留15个历史文件 -->
|
||||
<DefaultRolloverStrategy max="15"/>
|
||||
<!-- 最多保留30个历史文件 -->
|
||||
<DefaultRolloverStrategy max="30"/>
|
||||
|
||||
<!-- 只接收 info 及以上,但不包含 error(error 会被 error_file 接收) -->
|
||||
<Filters>
|
||||
@@ -37,8 +38,9 @@
|
||||
</RollingFile>
|
||||
|
||||
<!-- Error 日志文件,按时间/大小滚动 -->
|
||||
<RollingFile name="ErrorFile" fileName="${LOG_HOME}/app-error.log"
|
||||
filePattern="${LOG_HOME}/app-error-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<RollingFile name="ErrorFile"
|
||||
fileName="${LOG_HOME}/error.log"
|
||||
filePattern="logs/%d{yyyy-MM-dd}/error-%i.log.gz">
|
||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||
|
||||
<Policies>
|
||||
@@ -46,7 +48,7 @@
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
</Policies>
|
||||
|
||||
<DefaultRolloverStrategy max="15"/>
|
||||
<DefaultRolloverStrategy max="30"/>
|
||||
|
||||
<!-- 只记录 error 级别日志 -->
|
||||
<Filters>
|
||||
|
Reference in New Issue
Block a user