RollingFileAppender MaximumFileSize Property | Apache log4net™ SDK Documentation

Gets or sets the maximum size that the output file is allowed to reach before being rolled over to backup files.

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

C#
VB
C++
F#
Copy

    public string MaximumFileSize { get; set; }

    Public Property MaximumFileSize As String
    	Get
    	Set

    public:
    property String^ MaximumFileSize {
    	String^ get ();
    	void set (String^ value);
    }

    member MaximumFileSize : string with get, set

#### Property Value

Type: String
The maximum size that the output file is allowed to reach before being rolled over to backup files.
Remarks

This property allows you to specify the maximum size with the suffixes "KB", "MB" or "GB" so that the size is interpreted being expressed respectively in kilobytes, megabytes or gigabytes.

For example, the value "10KB" will be interpreted as 10240 bytes.

The default maximum file size is 10MB.

If you have the option to set the maximum file size programmatically consider using the MaxFileSize property instead as this allows you to set the size in bytes as a Int64.

See Also

#### Reference

RollingFileAppender Class
log4net.Appender Namespace