Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
OverflowAction Enumeration
Collapse the table of content
Expand the table of content

OverflowAction Enumeration

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

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public enum OverflowAction

Member nameDescription
DoNotOverwriteIndicates that existing entries are retained when the event log is full and new entries are discarded.
OverwriteAsNeededIndicates that each new entry overwrites the oldest entry when the event log is full.
OverwriteOlderIndicates that new events overwrite events older than specified by the 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 MinimumRetentionDays property value.

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:

  • New entries will be discarded.

  • New entries will overwrite older entries.

  • New entries will either be discarded or will overwrite existing entries depending upon the age of the existing entries.

Use the ModifyOverflowPolicy method to set the overflow behavior for an EventLog. Check the current configured behavior of an EventLog through its OverflowAction property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft