EventLog Methods
.NET Framework 4.5
The EventLog type exposes the following members.
| Name | Description | |
|---|---|---|
|
BeginInit | Begins the initialization of an EventLog used on a form or used by another component. The initialization occurs at runtime. |
|
Clear | Removes all entries from the event log. |
|
Close | Closes the event log and releases read and write handles. |
|
CreateEventSource(EventSourceCreationData) | Establishes a valid event source for writing localized event messages, using the specified configuration properties for the event source and the corresponding event log. |
|
CreateEventSource(String, String) | Establishes the specified source name as a valid event source for writing entries to a log on the local computer. This method can also create a new custom log on the local computer. |
|
CreateEventSource(String, String, String) | Obsolete. Establishes the specified source name as a valid event source for writing entries to a log on the specified computer. This method can also be used to create a new custom log on the specified computer. |
|
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
|
Delete(String) | Removes an event log from the local computer. |
|
Delete(String, String) | Removes an event log from the specified computer. |
|
DeleteEventSource(String) | Removes the event source registration from the event log of the local computer. |
|
DeleteEventSource(String, String) | Removes the application's event source registration from the specified computer. |
|
Dispose() | Releases all resources used by the Component. (Inherited from Component.) |
|
Dispose(Boolean) | Releases the unmanaged resources used by the EventLog, and optionally releases the managed resources. (Overrides Component.Dispose(Boolean).) |
|
EndInit | Ends the initialization of an EventLog used on a form or by another component. The initialization occurs at runtime. |
|
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
|
Exists(String) | Determines whether the log exists on the local computer. |
|
Exists(String, String) | Determines whether the log exists on the specified computer. |
|
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.) |
|
GetEventLogs() | Searches for all event logs on the local computer and creates an array of EventLog objects that contain the list. |
|
GetEventLogs(String) | Searches for all event logs on the given computer and creates an array of EventLog objects that contain the list. |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.) |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
LogNameFromSourceName | Gets the name of the log to which the specified source is registered. |
|
MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
|
ModifyOverflowPolicy | Changes the configured behavior for writing new entries when the event log reaches its maximum file size. |
|
RegisterDisplayName | Specifies the localized name of the event log, which is displayed in the server Event Viewer. |
|
SourceExists(String) | Determines whether an event source is registered on the local computer. |
|
SourceExists(String, String) | Determines whether an event source is registered on a specified computer. |
|
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.) |
|
WriteEntry(String) | Writes an information type entry, with the given message text, to the event log. |
|
WriteEntry(String, EventLogEntryType) | Writes an error, warning, information, success audit, or failure audit entry with the given message text to the event log. |
|
WriteEntry(String, String) | Writes an information type entry with the given message text to the event log, using the specified registered event source. |
|
WriteEntry(String, EventLogEntryType, Int32) | Writes an entry with the given message text and application-defined event identifier to the event log. |
|
WriteEntry(String, String, EventLogEntryType) | Writes an error, warning, information, success audit, or failure audit entry with the given message text to the event log, using the specified registered event source. |
|
WriteEntry(String, EventLogEntryType, Int32, Int16) | Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log. |
|
WriteEntry(String, String, EventLogEntryType, Int32) | Writes an entry with the given message text and application-defined event identifier to the event log, using the specified registered event source. |
|
WriteEntry(String, EventLogEntryType, Int32, Int16, Byte[]) | Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log, and appends binary data to the message. |
|
WriteEntry(String, String, EventLogEntryType, Int32, Int16) | Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log, using the specified registered event source. The category can be used by the Event Viewer to filter events in the log. |
|
WriteEntry(String, String, EventLogEntryType, Int32, Int16, Byte[]) | Writes an entry with the given message text, application-defined event identifier, and application-defined category to the event log (using the specified registered event source) and appends binary data to the message. |
|
WriteEvent(EventInstance, Object[]) | Writes a localized entry to the event log. |
|
WriteEvent(EventInstance, Byte[], Object[]) | Writes an event log entry with the given event data, message replacement strings, and associated binary data. |
|
WriteEvent(String, EventInstance, Object[]) | Writes an event log entry with the given event data and message replacement strings, using the specified registered event source. |
|
WriteEvent(String, EventInstance, Byte[], Object[]) | Writes an event log entry with the given event data, message replacement strings, and associated binary data, and using the specified registered event source. |