RollingFileAppenderCountDirection 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

public int CountDirection { 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