EventLogSession.ClearLog 方法

定义

从指定的事件日志中清除事件。

重载

名称 说明
ClearLog(String)

从指定的事件日志中清除事件。

ClearLog(String, String)

从指定的事件日志中清除事件,并将清除的事件保存到指定的文件中。

示例

有关使用此类的示例代码,请参阅 How To:Export、Archive 和 Clear 事件日志

ClearLog(String)

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

从指定的事件日志中清除事件。

public:
 void ClearLog(System::String ^ logName);
public void ClearLog(string logName);
member this.ClearLog : string -> unit
Public Sub ClearLog (logName As String)

参数

logName
String

要从中清除所有事件的事件日志的名称。

示例

有关使用此类的示例代码,请参阅 How To:Export、Archive 和 Clear 事件日志

另请参阅

适用于

ClearLog(String, String)

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

从指定的事件日志中清除事件,并将清除的事件保存到指定的文件中。

public:
 void ClearLog(System::String ^ logName, System::String ^ backupPath);
public void ClearLog(string logName, string? backupPath);
public void ClearLog(string logName, string backupPath);
member this.ClearLog : string * string -> unit
Public Sub ClearLog (logName As String, backupPath As String)

参数

logName
String

要从中清除所有事件的事件日志的名称。

backupPath
String

要在其中保存清除事件的文件的路径。 该文件应以 .evtx 结尾。

示例

有关使用此类的示例代码,请参阅 How To:Export、Archive 和 Clear 事件日志

另请参阅

适用于