You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Shaily Goel <gs...@novell.com> on 2006/06/21 13:31:28 UTC

maxSizeRollBackups property of Rolling File Appender

I am using Rolling File Appender provided by ““log4net-1.2.9-beta” version, for writing the logged messages into a local file.

I found that <maxSizeRollBackups> is supported only when "RollingStyle" property is set to "Size". If "RollingStyle" property is set to “RollingMode.Date” the property “maxSizeRollBackups” does not work. 

My Requirement is to Limit the number of back up copies whatever the “Rolling Style” (Size/Date) is set on appender.

Documentation of “log4net-1.2.9-beta” says that “maxSizeRollBackups” property is not supported when  “RollingStyle” is set to Date. But is there any work around to get this done??

Is there any plan to implement this feature in  next release of “log4net”. If yes, please let us know which release will contain this feature and what is the expected release date?


Thanks
Shaily



Re: maxSizeRollBackups property of Rolling File Appender

Posted by Ron Grabowski <ro...@yahoo.com>.
I suspect the difficulties deleting files rolled only by date is that
the appender would need to take into account the DatePattern used when
locating files to be considered for deleting. Counted backups
(log.txt.1, log.txt.2, log.txt.3, etc.) are easier to deal with because
integer sequences are more well-known. 

I'm not aware of any efforts to support rolling of files based on
RollingMode.Date.

--- Shaily Goel <gs...@novell.com> wrote:

> I am using Rolling File Appender provided by
��log4net-1.2.9-beta�
> version, for writing the logged messages into a local file.
> 
> I found that <maxSizeRollBackups> is supported only when
> "RollingStyle" property is set to "Size". If "RollingStyle" property
> is set to �RollingMode.Date� the property
�maxSizeRollBackups� does
> not work. 
> 
> My Requirement is to Limit the number of back up copies whatever the
> �Rolling Style� (Size/Date) is set on appender.
> 
> Documentation of �log4net-1.2.9-beta� says that
�maxSizeRollBackups�
> property is not supported when  �RollingStyle� is set to Date.
But is
> there any work around to get this done??
> 
> Is there any plan to implement this feature in  next release of
> �log4net�. If yes, please let us know which release will contain
this
> feature and what is the expected release date?
> 
> 
> Thanks
> Shaily
> 
> 
>