RollingFileAppender CountDirection Property | Apache log4net™ SDK Documentation

Gets or sets the rolling file count direction.

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

C#
VB
C++
F#
Copy

    public int CountDirection { get; set; }

    Public Property CountDirection As Integer
    	Get
    	Set

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

    member CountDirection : int with get, set

#### Property Value

Type: Int32
The rolling file count direction.
Remarks

Indicates if the current file is the lowest numbered file or the highest numbered file.

By default newer files have lower numbers (CountDirection < 0), i.e. log.1 is most recent, log.5 is the 5th backup, etc...

CountDirection >= 0 does the opposite i.e. log.1 is the first backup made, log.5 is the 5th backup made, etc. For infinite backups use CountDirection >= 0 to reduce rollover costs.

The default file count direction is -1.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace