This commit is contained in:
xiangwb
2018-03-08 13:07:49 +08:00
parent 6385d1859d
commit 8ce0f7785a
+4 -4
View File
@@ -35,11 +35,11 @@
<!-- 自动追加日志信息到文件中,直至文件达到预定的大小,然后自动重新生成另外一个文件来记录之后的日志-->
<!-- 设置日志格式并配置回滚日志压缩格式(error.log.年份.gz) -->
<RollingRandomAccessFile name="error_appender"
immediateFlush="false" fileName="${LOG_HOME}/error.log"
immediateFlush="true" fileName="${LOG_HOME}/error.log"
filePattern="${LOG_HOME}/error.%d{yyyy-MM-dd}.log.gz">
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %L %-5p %class{36} %M : %message%xEx%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %L %-5p %class{36} %M -->%message%xEx%n</pattern>
</PatternLayout>
<!-- 指定滚动日志的策略,就是什么时候进行新建日志文件输出日志.-->
<Policies>
@@ -49,11 +49,11 @@
</RollingRandomAccessFile>
<!-- info.log-->
<RollingRandomAccessFile name="info_appender"
immediateFlush="false" fileName="${LOG_HOME}/info.log"
immediateFlush="true" fileName="${LOG_HOME}/info.log"
filePattern="${LOG_HOME}/info.%d{yyyy-MM-dd}.log.gz">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %L %-5p %class{36} %M : %message%xEx%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %L %-5p %class{36} %M -->%message%xEx%n</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>