Authored by liangyi.chen@yoho.cn

Fix

@@ -33,11 +33,13 @@ @@ -33,11 +33,13 @@
33 <!-- DEBUG、INFO、WARN、ERROR级别日志 appender --> 33 <!-- DEBUG、INFO、WARN、ERROR级别日志 appender -->
34 <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> 34 <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
35 <file>/Data/logs/yoho-datasync-consumer/debug.log</file> 35 <file>/Data/logs/yoho-datasync-consumer/debug.log</file>
36 - <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> 36 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
37 <!-- daily rollover --> 37 <!-- daily rollover -->
38 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/debug.%d{yyyy-MM-dd}.%i.log</fileNamePattern> 38 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/debug.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
39 - <!-- or whenever the file size reaches 100MB -->  
40 - <maxFileSize>${maxFileSize}</maxFileSize> 39 + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  40 + <!-- or whenever the file size reaches 100MB -->
  41 + <maxFileSize>${maxFileSize}</maxFileSize>
  42 + </timeBasedFileNamingAndTriggeringPolicy>
41 <!-- keep 30 days' worth of history --> 43 <!-- keep 30 days' worth of history -->
42 <maxHistory>${maxHistory}</maxHistory> 44 <maxHistory>${maxHistory}</maxHistory>
43 </rollingPolicy> 45 </rollingPolicy>
@@ -55,12 +57,15 @@ @@ -55,12 +57,15 @@
55 <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> 57 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
56 <level>INFO</level> 58 <level>INFO</level>
57 </filter> 59 </filter>
58 - <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">  
59 - <!-- 按天回滚 daily --> 60 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  61 + <!-- daily rollover -->
60 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/info.%d{yyyy-MM-dd}.%i.log</fileNamePattern> 62 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/info.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
61 - <!-- 日志最大的保存天数 --> 63 + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  64 + <!-- or whenever the file size reaches 100MB -->
  65 + <maxFileSize>${maxFileSize}</maxFileSize>
  66 + </timeBasedFileNamingAndTriggeringPolicy>
  67 + <!-- keep 30 days' worth of history -->
62 <maxHistory>${maxHistory}</maxHistory> 68 <maxHistory>${maxHistory}</maxHistory>
63 - <maxFileSize>${maxFileSize}</maxFileSize>  
64 </rollingPolicy> 69 </rollingPolicy>
65 <encoder> 70 <encoder>
66 <Pattern>${CONSOLE_LOG_PATTERN}</Pattern> 71 <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
@@ -76,12 +81,15 @@ @@ -76,12 +81,15 @@
76 <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> 81 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
77 <level>WARN</level> 82 <level>WARN</level>
78 </filter> 83 </filter>
79 - <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">  
80 - <!-- 按天回滚 daily --> 84 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  85 + <!-- daily rollover -->
81 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/warn.%d{yyyy-MM-dd}.%i.log</fileNamePattern> 86 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/warn.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
82 - <!-- 日志最大的保存天数 --> 87 + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  88 + <!-- or whenever the file size reaches 100MB -->
  89 + <maxFileSize>${maxFileSize}</maxFileSize>
  90 + </timeBasedFileNamingAndTriggeringPolicy>
  91 + <!-- keep 30 days' worth of history -->
83 <maxHistory>${maxHistory}</maxHistory> 92 <maxHistory>${maxHistory}</maxHistory>
84 - <maxFileSize>${maxFileSize}</maxFileSize>  
85 </rollingPolicy> 93 </rollingPolicy>
86 <encoder> 94 <encoder>
87 <Pattern>${CONSOLE_LOG_PATTERN}</Pattern> 95 <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
@@ -93,10 +101,13 @@ @@ -93,10 +101,13 @@
93 <!-- 数据检测相关日志 --> 101 <!-- 数据检测相关日志 -->
94 <appender name="DATA_CHECKERROR_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender"> 102 <appender name="DATA_CHECKERROR_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
95 <file>/Data/logs/yoho-datasync-consumer/datacheck-error.log</file> 103 <file>/Data/logs/yoho-datasync-consumer/datacheck-error.log</file>
96 - <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> 104 + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
97 <!-- daily rollover --> 105 <!-- daily rollover -->
98 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/datacheck-error.%d{yyyy-MM-dd}.%i.log</fileNamePattern> 106 <fileNamePattern>/Data/logs/yoho-datasync-consumer/archived/datacheck-error.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
99 - <maxFileSize>${maxFileSize}</maxFileSize> 107 + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  108 + <!-- or whenever the file size reaches 100MB -->
  109 + <maxFileSize>${maxFileSize}</maxFileSize>
  110 + </timeBasedFileNamingAndTriggeringPolicy>
100 <!-- keep 30 days' worth of history --> 111 <!-- keep 30 days' worth of history -->
101 <maxHistory>${maxHistory}</maxHistory> 112 <maxHistory>${maxHistory}</maxHistory>
102 </rollingPolicy> 113 </rollingPolicy>