EventLogQuery Class

EventLogQuery Class

 

Represents a query for events in an event log and the settings that define how the query is executed and on what computer the query is executed on.

Namespace:   System.Diagnostics.Eventing.Reader
Assembly:  System.Core (in System.Core.dll)

System.Object
  System.Diagnostics.Eventing.Reader.EventLogQuery

public class EventLogQuery

NameDescription
System_CAPS_pubmethodEventLogQuery(String, PathType)

Initializes a new instance of the EventLogQuery class by specifying the target of the query. The target can be an active event log or a log file.

System_CAPS_pubmethodEventLogQuery(String, PathType, String)

Initializes a new instance of the EventLogQuery class by specifying the target of the query and the event query. The target can be an active event log or a log file.

NameDescription
System_CAPS_pubpropertyReverseDirection

Gets or sets the Boolean value that determines whether to read events from the newest event in an event log to the oldest event in the log.

System_CAPS_pubpropertySession

Gets or sets the session that access the Event Log service on the local computer or a remote computer. This object can be set to access a remote event log by creating a EventLogReader object or an EventLogWatcher object with this EventLogQuery object.

System_CAPS_pubpropertyTolerateQueryErrors

Gets or sets a Boolean value that determines whether this query will continue to retrieve events when the query has an error.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

For example code using this class, see How To: Query for Events or How To: Access and Read Event Information.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

System.Diagnostics.Eventing.Reader Namespace
Technology Summary for Reading and Managing Event Logs
Event Log Scenarios

Return to top
Show:
© 2016 Microsoft