[ https://issues.apache.org/jira/browse/LOG4NET-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13555259#comment-13555259 ]
Joshua Masek commented on LOG4NET-27: ------------------------------------- I'm glad there is still chatter on this issue, which shows there is other interest out there for a solution. I uploaded a solution a few years back. Not saying that it was awesome code, but I think it works. It made me realize how this feature wasn't as simple as it sounded. Some comments geared towards recent discussion: * it would need to roll by date AND by maxSizeRollBackups * it would need to delete files where the date could be much older than the time period's current range. So if we are keeping the last 20 days of log files where the log filename has the date in it, it should be able to delete a log file from last year (along with any files rolled over based on maxSizeRollBackups for that date), as the application might not have been run in awhile. * as for the ".history.txt" idea, it sounds good, at first anyways, as I haven't thought about it much. If this file were missing, it could use an algorithm to basically try to auto-detect the files that should be in this list and recreate it. (Like I imagine one could change my patch or write a new one to instead of detecting files to delete, rather detect files that should be in this .history.txt file.) Although not sure if it is a big deal that if the history file gets deleted, we just leave the logs there as forgotten. > Rolling files on date/time boundaries doesn't support a maximum number of > backup files. > --------------------------------------------------------------------------------------- > > Key: LOG4NET-27 > URL: https://issues.apache.org/jira/browse/LOG4NET-27 > Project: Log4net > Issue Type: New Feature > Components: Appenders > Affects Versions: 1.2.11 > Reporter: Florian Ramillien > Priority: Minor > Fix For: 1.2 Maintenance Release > > Attachments: LOG4NET-27.patch, RollingFileAppender.cs, > RollingFileAppender.cs, RollingFileAppender.cs, RollingFileAppender.cs.patch, > RollingFileAppender.patch > > > A maximum of backup files exist when rolling files on file size, but not for > rolling on date/time. > This can be implemented with the same config key : MaxSizeRollBackups -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira