...
|
...
|
@@ -33,15 +33,11 @@ |
|
|
<!-- DEBUG、INFO、WARN、ERROR级别日志 appender -->
|
|
|
<appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
|
<file>/Data/logs/yoho-datasync-producer/debug.log</file>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- daily rollover -->
|
|
|
<fileNamePattern>/Data/logs/yoho-datasync-producer/archived/debug.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
|
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- or whenever the file size reaches 100MB -->
|
|
|
<maxFileSize>${maxFileSize}</maxFileSize>
|
|
|
</timeBasedFileNamingAndTriggeringPolicy>
|
|
|
<!-- keep 30 days' worth of history -->
|
|
|
<maxHistory>${maxHistory}</maxHistory>
|
|
|
<maxFileSize>${maxFileSize}</maxFileSize>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
...
|
...
|
@@ -57,15 +53,13 @@ |
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
|
<level>INFO</level>
|
|
|
</filter>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- 按天回滚 daily -->
|
|
|
<fileNamePattern>/Data/logs/yoho-datasync-producer/archived/info.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
|
|
<!-- 日志最大的保存天数 -->
|
|
|
<maxHistory>${maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
|
|
<maxFileSize>${maxFileSize}</maxFileSize>
|
|
|
</triggeringPolicy>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
|
|
<!-- 设置字符集 -->
|
...
|
...
|
@@ -80,15 +74,13 @@ |
|
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
|
|
<level>WARN</level>
|
|
|
</filter>
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
|
|
<!-- 按天回滚 daily -->
|
|
|
<fileNamePattern>/Data/logs/yoho-datasync-producer/archived/warn.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
|
|
<!-- 日志最大的保存天数 -->
|
|
|
<maxHistory>${maxHistory}</maxHistory>
|
|
|
</rollingPolicy>
|
|
|
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
|
|
<maxFileSize>${maxFileSize}</maxFileSize>
|
|
|
</triggeringPolicy>
|
|
|
</rollingPolicy>
|
|
|
<encoder>
|
|
|
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
|
|
<!-- 设置字符集 -->
|
...
|
...
|
|