赞
踩
设置了maxHistory不起作用,增加cleanHistoryOnStart后可以
<appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/default.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/default-%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>30</maxHistory>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
</appender>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。