Commit a98efd792846693653c460620d8c0967361fcd46

Authored by 谭毅彬
1 parent aad647a8

优化logs输出文件名称及分块大小

Signed-off-by: TanYibin <5491541@qq.com>
huaheng-wms-core/src/main/resources/logback-spring.xml
@@ -22,10 +22,10 @@ @@ -22,10 +22,10 @@
22 <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> 22 <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
23 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 23 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
24 <!--日志文件输出的文件名 --> 24 <!--日志文件输出的文件名 -->
25 - <FileNamePattern>${LOG_HOME}/jeecgboot-%d{yyyy-MM-dd}.%i.log</FileNamePattern> 25 + <FileNamePattern>${LOG_HOME}/wms-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
26 <!--日志文件保留天数 --> 26 <!--日志文件保留天数 -->
27 <MaxHistory>30</MaxHistory> 27 <MaxHistory>30</MaxHistory>
28 - <maxFileSize>10MB</maxFileSize> 28 + <maxFileSize>100MB</maxFileSize>
29 </rollingPolicy> 29 </rollingPolicy>
30 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> 30 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
31 <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 --> 31 <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 <pattern>%p%d%msg%M%F{32}%L</pattern> 44 <pattern>%p%d%msg%M%F{32}%L</pattern>
45 </layout> 45 </layout>
46 </encoder> 46 </encoder>
47 - <file>${LOG_HOME}/error-log.html</file> 47 + <file>${LOG_HOME}/wms-error-log.html</file>
48 </appender> 48 </appender>
49 <!-- 生成 error html格式日志结束 --> 49 <!-- 生成 error html格式日志结束 -->
50 50
@@ -52,10 +52,10 @@ @@ -52,10 +52,10 @@
52 <appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender"> 52 <appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
53 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> 53 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
54 <!--日志文件输出的文件名 --> 54 <!--日志文件输出的文件名 -->
55 - <FileNamePattern>${LOG_HOME}/jeecgboot-%d{yyyy-MM-dd}.%i.html</FileNamePattern> 55 + <FileNamePattern>${LOG_HOME}/wms-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
56 <!--日志文件保留天数 --> 56 <!--日志文件保留天数 -->
57 <MaxHistory>30</MaxHistory> 57 <MaxHistory>30</MaxHistory>
58 - <MaxFileSize>10MB</MaxFileSize> 58 + <MaxFileSize>100MB</MaxFileSize>
59 </rollingPolicy> 59 </rollingPolicy>
60 <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> 60 <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
61 <layout class="ch.qos.logback.classic.html.HTMLLayout"> 61 <layout class="ch.qos.logback.classic.html.HTMLLayout">