EventLogSession.ExportLog EventLogSession.ExportLog EventLogSession.ExportLog Method

定義

將事件匯入至外部記錄檔中。Exports events into an external log file. 儲存這些事件時,並不包含事件訊息。The events are stored without the event messages.

多載

ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String) 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) ExportLog(String, PathType, String, String, Boolean) 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) ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String)

將事件匯入至外部記錄檔中。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

參數

path
String String 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 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 String String

用來選取要匯出之事件的查詢。The query used to select the events to export. 系統只會匯出由查詢傳回的事件。Only the events returned from the query will be exported.

targetFilePath
String String String

在執行此方法後將儲存已匯出事件的記錄檔 (以 .evtx 為結尾) 路徑。The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

另請參閱

ExportLog(String, PathType, String, String, Boolean) ExportLog(String, PathType, String, String, Boolean) 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.

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

參數

path
String String 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 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 String String

用來選取要匯出之事件的查詢。The query used to select the events to export. 系統只會匯出由查詢傳回的事件。Only the events returned from the query will be exported.

targetFilePath
String String String

在執行此方法後將儲存已匯出事件的記錄檔 (以 .evtx 為結尾) 路徑。The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

tolerateQueryErrors
Boolean Boolean Boolean

true 指出方法將會繼續匯出事件,即使指定的查詢針對部分記錄發生失敗,而 false 則指出此方法在指定的查詢失敗時將不會繼續匯出事件。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.

另請參閱

適用於