【发布时间】:2016-08-03 14:30:20
【问题描述】:
我想将 EventViewer 中的条目记录为关键,但我没有关联的 EventLogType:
System.Diagnostics.EventLog.WriteEntry("ApplicationName", message, System.Diagnostics.EventLogEntryType.Error);
根据 MSDN,EventLogEntryType 只有 5 个可能的值:
Error
Warning
FailureAudit
Information
SuccessAudit
在 EventViewer 中,有 5 个严重级别:
Critical
Error
Warning
Information
Verbose
但它没有映射! 错误日志中的错误 警告中的警告日志 但是FailureAudit、Information和SuccessAudit登录Information
您知道如何使用 EventLog.WriteEvent 记录关键事件吗?
【问题讨论】:
-
这个问题的答案非常无益
-
我相信关键事件只能由操作系统编写。