EventLogSession.ClearLog Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Clears events from the specified event log.
Overloads
ClearLog(String) |
Clears events from the specified event log. |
ClearLog(String, String) |
Clears events from the specified event log, and saves the cleared events to the specified file. |
Examples
For example code using this class, see How To: Export, Archive, and Clear Event Logs.
ClearLog(String)
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
Clears events from the specified event log.
public:
void ClearLog(System::String ^ logName);
public void ClearLog (string logName);
member this.ClearLog : string -> unit
Public Sub ClearLog (logName As String)
Parameters
- logName
- String
The name of the event log to clear all the events from.
Examples
For example code using this class, see How To: Export, Archive, and Clear Event Logs.
See also
Applies to
ClearLog(String, String)
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
- Source:
- EventLogSession.cs
Clears events from the specified event log, and saves the cleared events to the specified file.
public:
void ClearLog(System::String ^ logName, System::String ^ backupPath);
public void ClearLog (string logName, string backupPath);
member this.ClearLog : string * string -> unit
Public Sub ClearLog (logName As String, backupPath As String)
Parameters
- logName
- String
The name of the event log to clear all the events from.
- backupPath
- String
The path to the file in which the cleared events will be saved. The file should end in .evtx.
Examples
For example code using this class, see How To: Export, Archive, and Clear Event Logs.
See also
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기