Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

RollingFileAppender.CountDirection Property

Gets or sets the rolling file count direction.


Property Value

The rolling file count direction.


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

RollingFileAppender Class | log4net.Appender Namespace