System.Diagnostics.OverflowAction Enumeration

Specifies how to handle entries in an event log that has reached its maximum file size.

Syntax

public enum OverflowAction

Remarks

Every event log has a maximum size limit and a configurable setting that provides the rule for writing new entries at that limit. When the event log has reached its maximum size, you can specify one of the following rules:

Use the EventLog.ModifyOverflowPolicy(OverflowAction, int) method to set the overflow behavior for an System.Diagnostics.EventLog. Check the current configured behavior of an System.Diagnostics.EventLog through its EventLog.OverflowAction property.

Members

Member NameDescription
DoNotOverwrite

Indicates that existing entries are retained when the event log is full and new entries are discarded.

OverwriteAsNeeded

Indicates that each new entry overwrites the oldest entry when the event log is full.

OverwriteOlder

Indicates that new events overwrite events older than specified by the EventLog.MinimumRetentionDays property value when the event log is full. New events are discarded if the event log is full and there are no events older than specified by the EventLog.MinimumRetentionDays property value.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0