RollingFileAppender MaxSizeRollBackups Property | Apache log4net™ SDK Documentation

Gets or sets the maximum number of backup files that are kept before the oldest is erased.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public int MaxSizeRollBackups { get; set; }

    Public Property MaxSizeRollBackups As Integer
    	Get
    	Set

    public:
    property int MaxSizeRollBackups {
    	int get ();
    	void set (int value);
    }

    member MaxSizeRollBackups : int with get, set

#### Property Value

Type: Int32
The maximum number of backup files that are kept before the oldest is erased.
Remarks

If set to zero, then there will be no backup files and the log file will be truncated when it reaches MaxFileSize.

If a negative number is supplied then no deletions will be made. Note that this could result in very slow performance as a large number of files are rolled over unless CountDirection is used.

The maximum applies to each time based group of files and not the total.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace