EventLog.OverflowAction Property

 

Gets the configured behavior for storing new entries when the event log reaches its maximum log file size.

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

[<BrowsableAttribute(false)>]
[<ComVisibleAttribute(false)>]
member OverflowAction : OverflowAction with get

Property Value

Type: System.Diagnostics.OverflowAction

The OverflowAction value that specifies the configured behavior for storing new entries when the event log reaches its maximum log size. The default is OverwriteOlder.

Event logs grow in size as new events are written to them. Each event log has a configured maximum size limit; the MaximumKilobytes property defines the maximum number of kilobytes allowed for the event log file size.

Use the OverflowAction property value to examine the configured overflow behavior for an event log at its maximum size. Use the ModifyOverflowPolicy method to change the overflow behavior for an event log.

System_CAPS_noteNote

The overflow behavior takes effect only when an event log reaches its maximum file size. The overflow behavior does not affect writing a new entry to a log that can accommodate additional event log entries.

The following example enumerates the event logs defined on the local computer, and displays configuration details for each event log.

No code example is currently available or this language may not be supported.

EventLogPermission

for administering event log information on the computer. Associated enumeration: EventLogPermissionAccess.Administer

.NET Framework
Available since 2.0
Return to top
Show: