Export (0) Print
Expand All

EventLog Methods

The EventLog type exposes the following members.

  Name Description
Public method BeginInit Begins the initialization of an EventLog used on a form or used by another component. The initialization occurs at runtime.
Public method Clear Removes all entries from the event log.
Public method Close Closes the event log and releases read and write handles.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method 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.)
Public method Static member Delete(String) Removes an event log from the local computer.
Public method Static member Delete(String, String) Removes an event log from the specified computer.
Public method Static member DeleteEventSource(String) Removes the event source registration from the event log of the local computer.
Public method Static member DeleteEventSource(String, String) Removes the application's event source registration from the specified computer.
Public method Dispose() Releases all resources used by the Component. (Inherited from Component.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by the EventLog, and optionally releases the managed resources. (Overrides Component.Dispose(Boolean).)
Public method EndInit Ends the initialization of an EventLog used on a form or by another component. The initialization occurs at runtime.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Static member Exists(String) Determines whether the log exists on the local computer.
Public method Static member Exists(String, String) Determines whether the log exists on the specified computer.
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method Static member GetEventLogs() Searches for all event logs on the local computer and creates an array of EventLog objects that contain the list.
Public method Static member GetEventLogs(String) Searches for all event logs on the given computer and creates an array of EventLog objects that contain the list.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Static member LogNameFromSourceName Gets the name of the log to which the specified source is registered.
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method ModifyOverflowPolicy Changes the configured behavior for writing new entries when the event log reaches its maximum file size.
Public method RegisterDisplayName Specifies the localized name of the event log, which is displayed in the server Event Viewer.
Public method Static member SourceExists(String) Determines whether an event source is registered on the local computer.
Public method Static member SourceExists(String, String) Determines whether an event source is registered on a specified computer.
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public method WriteEntry(String) Writes an information type entry, with the given message text, to the event log.
Public method WriteEntry(String, EventLogEntryType) Writes an error, warning, information, success audit, or failure audit entry with the given message text to the event log.
Public method Static member WriteEntry(String, String) Writes an information type entry with the given message text to the event log, using the specified registered event source.
Public method WriteEntry(String, EventLogEntryType, Int32) Writes an entry with the given message text and application-defined event identifier to the event log.
Public method Static member 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.
Public method 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.
Public method Static member 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.
Public method 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.
Public method Static member 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.
Public method Static member 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.
Public method WriteEvent(EventInstance, Object[]) Writes a localized entry to the event log.
Public method WriteEvent(EventInstance, Byte[], Object[]) Writes an event log entry with the given event data, message replacement strings, and associated binary data.
Public method Static member WriteEvent(String, EventInstance, Object[]) Writes an event log entry with the given event data and message replacement strings, using the specified registered event source.
Public method Static member 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.
Top
Show:
© 2014 Microsoft