Logback: SizeAndTimeBasedRollingPolicy applies totalSizeCap to each day in maxHistory

此生再无相见时 提交于 2019-12-04 05:17:34

It seems that you have found a bug!

There should be no gaps in the logs. When totalSizeCap is reached, the oldest log file should be deleted. When maxHistory reached, the oldest log file should be deleted.

Unfortunately it seems that there is a bug in logback which causes gaps in the logging because not the oldest files are deleted. See demonstration here: https://github.com/riskop/slf4j_logback_SizeAndTimeBasedRollingPolicy_problem

I've opened an issue: https://jira.qos.ch/browse/LOGBACK-1361

According to Gülcü it will be fixed in logback classic 1.3.0.

Note that you can "vote" the issue on logback's Jira!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!