Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
1.0.0
-
None
Description
sometimes i want the compressed log into bak folder.it means the current log file and compressed file in different folder.I define a statement as follows。
<property name="log.path" value="logs" />
<property name="log.backup" value="logsBackup" />
<appender name="info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<file>${log.path}/info.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>${log.backup}/info-%d
.%i.zip</fileNamePattern>
<maxHistory>30</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>2KB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>[%-4level][%d
][%C:%F:%L] - %msg%n</pattern>
</encoder>
</appender>
i expect the info log over 2KB then compressed and put it into logsBackup folder,but not.is there something wrong? or what to do?
thanks very much!