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

Ron Grabowski commented on LOG4NET-27:
--------------------------------------

Thanks for the patch! Is there anyway you can write the patch against the 
current revision in source control? There's been a number of largish pages 
since the 1.2.10 release. I haven't diff'ed the two files yet...maybe its just 
a simple copy paste of one or two methods and fixing wrapping the file IO calls 
to be called within the correct context like the calls to File.Move and 
File.Delete.

I'm not sure I follow this code:

 else if (!byte.TryParse(current.Substring(charLoop, 1), out dummyByte))

Will that work if the numbers are not single digits: 10, .11, .12 ?

I don't understand the need for PreviousCheckDate. Can't you determine the 
previous and current files by capturing the parameters to RollFile?

None of the other file rolling code looks at the file system's date modified 
time...its all based on the filename. I wonder if this inconsistency will cause 
unexpected behavior. 

My idea was to change the signature of RollFile to return the name of the 
rolled file, create a list of rolled files, then iterate through that list and 
determine which of the new files are over the MaxDateRollBackups threshold and 
delete those files. I don't think it should take a lot of code to implement 
this functionality.




> 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.11
>
>         Attachments: 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to