The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
FileLogTraceListener::MaxFileSize Property
.NET Framework (current version)
Gets or sets the maximum allowed size of the log file, in bytes.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Property Value
Type: System::Int64Long. This is the maximum allowed log-file size, in bytes. The default value is 5000000.
| Exception | Condition |
|---|---|
| ArgumentException | When this property is set to a value less than 1000. |
Use this property to make sure that the log files do not grow too large.
If the log file size (in bytes) is greater than the value of this property, then when the FileLogTraceListener class attempts to write a message to the log, the message is discarded and the failure is either silent or an exception is thrown depending on the value of the DiskSpaceExhaustedBehavior property. Otherwise, the message is written to the log, if the amount of free disk space (in bytes) is less than ReserveDiskSpace.
.NET Framework
Available since 2.0
Available since 2.0
Show: