Export (0) Print
Expand All

EventLog Members

Provides interaction with Windows event logs.

The following tables list the members exposed by the EventLog type.

  Name Description
Public method EventLog Overloaded. Initializes a new instance of the EventLog class.
Top

(see also Protected Properties )
  Name Description
Public property Container  Gets the IContainer that contains the Component.(Inherited from Component.)
Public property EnableRaisingEvents Gets or sets a value indicating whether the EventLog receives EntryWritten event notifications.
Public property Entries Gets the contents of the event log.
Public property Log Gets or sets the name of the log to read from or write to.
Public property LogDisplayName Gets the event log's friendly name.
Public property MachineName Gets or sets the name of the computer on which to read or write events.
Public property MaximumKilobytes Gets or sets the maximum event log size in kilobytes.
Public property MinimumRetentionDays Gets the number of days to retain entries in the event log.
Public property OverflowAction Gets the configured behavior for storing new entries when the event log reaches its maximum log file size.
Public property Site  Gets or sets the ISite of the Component.(Inherited from Component.)
Public property Source Gets or sets the source name to register and use when writing to the event log.
Public property SynchronizingObject Gets or sets the object used to marshal the event handler calls issued as a result of an EventLog entry written event.
Top

  Name Description
Protected property CanRaiseEvents  Gets a value indicating whether the component can raise an event.(Inherited from Component.)
Protected property DesignMode  Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)
Protected property Events  Gets the list of event handlers that are attached to this Component.(Inherited from Component.)
Top

(see also Protected Methods )
  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 CreateEventSource Overloaded. Establishes an application as able to write event information to a particular log on the system.
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 Delete Overloaded. Removes a log resource.
Public method Static DeleteEventSource Overloaded. Removes an application's event source registration from the event log.
Public method Dispose Overloaded. Releases the resources used by the EventLog.
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  Overloaded. Determines whether two Object instances are equal. (Inherited from Object.)
Public method Static Exists Overloaded. Determines whether the specified log exists.
Public method Static GetEventLogs Overloaded. Creates an array of the event logs.
Public method GetHashCode  Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.)
Public method GetLifetimeService  Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
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 LogNameFromSourceName Gets the name of the log to which the specified source is registered.
Public method ModifyOverflowPolicy Changes the configured behavior for writing new entries when the event log reaches its maximum file size.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method RegisterDisplayName Specifies the localized name of the event log, which is displayed in the server Event Viewer.
Public method Static SourceExists Overloaded. Searches a computer's registry for a given event source.
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 Overloaded. Writes an entry in the event log.
Public method WriteEvent Overloaded. Writes a localized event entry to the event log.
Top

  Name Description
Protected method Dispose Overloaded. Overridden. Releases the resources used by the EventLog.
Protected method Finalize  Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Protected method GetService  Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Protected method MemberwiseClone  Overloaded. (Inherited from MarshalByRefObject.)
Top

  Name Description
Public event Disposed  Adds an event handler to listen to the Disposed event on the component.(Inherited from Component.)
Public event EntryWritten Occurs when an entry is written to an event log on the local computer.
Top

Community Additions

ADD
Show:
© 2014 Microsoft