RollingFileAppender RollOverRenameFiles Method | Apache log4net™ SDK Documentation

Implements file roll.

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

C#
VB
C++
F#
Copy

    protected void RollOverRenameFiles(
    	string baseFileName
    )

    Protected Sub RollOverRenameFiles (
    	baseFileName As String
    )

    protected:
    void RollOverRenameFiles(
    	String^ baseFileName
    )

    member RollOverRenameFiles :
            baseFileName : string -> unit

#### Parameters

baseFileName
  Type: System
  String
  the base name to rename

Remarks

If the maximum number of size based backups is reached (curSizeRollBackups == maxSizeRollBackups) then the oldest file is deleted -- its index determined by the sign of countDirection. If countDirection < 0, then files {File.1, ..., File.curSizeRollBackups -1} are renamed to {File.2, ..., File.curSizeRollBackups}.

If maxSizeRollBackups is equal to zero, then the File is truncated with no backup files created.

If maxSizeRollBackups < 0, then File is renamed if needed and no files are deleted.

This is called by RollOverSize
to rename the files.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace