Bewerken

Delen via


EventLogSession.ExportLog Method

Definition

Exports events into an external log file. The events are stored without the event messages.

Overloads

ExportLog(String, PathType, String, String)

Exports events into an external log file. The events are stored without the event messages.

ExportLog(String, PathType, String, String, Boolean)

Exports events into an external log file. A flag can be set to indicate that the method will continue exporting events even if the specified query fails for some logs. The events are stored without the event messages.

ExportLog(String, PathType, String, String)

Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs

Exports events into an external log file. The events are stored without the event messages.

public:
 void ExportLog(System::String ^ path, System::Diagnostics::Eventing::Reader::PathType pathType, System::String ^ query, System::String ^ targetFilePath);
public void ExportLog (string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath);
member this.ExportLog : string * System.Diagnostics.Eventing.Reader.PathType * string * string -> unit
Public Sub ExportLog (path As String, pathType As PathType, query As String, targetFilePath As String)

Parameters

path
String

The name of the event log to export events from, or the path to the event log file to export events from.

pathType
PathType

Specifies whether the string used in the path parameter specifies the name of an event log, or the path to an event log file.

query
String

The query used to select the events to export. Only the events returned from the query will be exported.

targetFilePath
String

The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

See also

Applies to

ExportLog(String, PathType, String, String, Boolean)

Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs
Source:
EventLogSession.cs

Exports events into an external log file. A flag can be set to indicate that the method will continue exporting events even if the specified query fails for some logs. The events are stored without the event messages.

public:
 void ExportLog(System::String ^ path, System::Diagnostics::Eventing::Reader::PathType pathType, System::String ^ query, System::String ^ targetFilePath, bool tolerateQueryErrors);
public void ExportLog (string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors);
member this.ExportLog : string * System.Diagnostics.Eventing.Reader.PathType * string * string * bool -> unit
Public Sub ExportLog (path As String, pathType As PathType, query As String, targetFilePath As String, tolerateQueryErrors As Boolean)

Parameters

path
String

The name of the event log to export events from, or the path to the event log file to export events from.

pathType
PathType

Specifies whether the string used in the path parameter specifies the name of an event log, or the path to an event log file.

query
String

The query used to select the events to export. Only the events returned from the query will be exported.

targetFilePath
String

The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

tolerateQueryErrors
Boolean

true indicates that the method will continue exporting events even if the specified query fails for some logs, and false indicates that this method will not continue to export events when the specified query fails.

See also

Applies to