Join GitHub today
Add support for Logback's FixedWindowRollingPolicy #1218
With Fixed Window Rolling Policy (archivedLogFilenamePattern: -%i), we have control on the size (maxFileSize) and the number of log files (archiveFileCount) that will reside on the host. We will not have to worry about disk usage warnings.
Recently Size and Time Based Archiving (archivedLogFilenamePattern: -%d-%i) with maxFileSize option has been added as part of commit: 343680b. In this archival policy we have control on the size of each log file (it will rotate the logs and increment the index after maxFileSize is reached), but the archiveFileCount only applies to the number of days worth of files that should be maintained. So on any specific day, files will keep getting rolled over indefinitely with a new index when the maxFileSize is reached. These log files will continue to accumulate as long as it is within the number of days mentioned in archiveFileCount. So we will lose control on the number and size of log files on the host, and disk usage may be a concern.
I hope you find this useful. I'm open to suggestions as well. Thanks.