EventLogSession.ExportLog 方法

定義

將事件匯入至外部記錄檔中。 儲存這些事件時,並不包含事件訊息。

多載

ExportLog(String, PathType, String, String)

將事件匯入至外部記錄檔中。 儲存這些事件時,並不包含事件訊息。

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

將事件匯入至外部記錄檔中。 可以設定旗標以指出方法將會繼續匯出事件,即使指定的查詢針對部分記錄發生失敗。 儲存這些事件時,並不包含事件訊息。

ExportLog(String, PathType, String, String)

來源:
EventLogSession.cs
來源:
EventLogSession.cs
來源:
EventLogSession.cs

將事件匯入至外部記錄檔中。 儲存這些事件時,並不包含事件訊息。

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)

參數

path
String

要匯出事件的事件記錄名稱或事件記錄檔路徑。

pathType
PathType

指定用於路徑參數的字串是否會指定事件記錄名稱或事件記錄檔路徑。

query
String

用來選取要匯出之事件的查詢。 系統只會匯出由查詢傳回的事件。

targetFilePath
String

在執行此方法後將儲存已匯出事件的記錄檔 (以 .evtx 為結尾) 路徑。

另請參閱

適用於

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

來源:
EventLogSession.cs
來源:
EventLogSession.cs
來源:
EventLogSession.cs

將事件匯入至外部記錄檔中。 可以設定旗標以指出方法將會繼續匯出事件,即使指定的查詢針對部分記錄發生失敗。 儲存這些事件時,並不包含事件訊息。

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)

參數

path
String

要匯出事件的事件記錄名稱或事件記錄檔路徑。

pathType
PathType

指定用於路徑參數的字串是否會指定事件記錄名稱或事件記錄檔路徑。

query
String

用來選取要匯出之事件的查詢。 系統只會匯出由查詢傳回的事件。

targetFilePath
String

在執行此方法後將儲存已匯出事件的記錄檔 (以 .evtx 為結尾) 路徑。

tolerateQueryErrors
Boolean

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

另請參閱

適用於