[ 
https://issues.apache.org/jira/browse/LOG4NET-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558627#comment-13558627
 ] 

Dominik Psenner commented on LOG4NET-27:
----------------------------------------

Thanks for your help! If I read your patch correctly, you retrieve a list of 
filenames from the directory where m_baseFileName is stored at and delete the 
oldest ones if the number of files is bigger than m_maxSizeRollBackups based on 
the LastWriteTime property on the file.

I'm not accepting the patch as-is, but it steers into the right direction. The 
reasons why I'm not accepting it:

[1] it eventually deletes unrelated files if m_BaseFileName is configured badly 
(i.e. a users home folder)
[2] what does the m_trimFilesDaily property do? According to its name it 
deletes the files daily, but where is the "daily check"? It would seem to me 
that part of the code does not change the behaviour, does it?

and the refactorable minor issues are:

[3] missing documentation
[4] duplicated code
[5] the indentation of the patch are spaces where it should be tabs instead

Would you please look into fixing [1] and [2]?
                
> 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: appender_diff, 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

Reply via email to