如何在临界级别记录事件日志?

How to log an Event log in the Critical level?

我想在 EventViewer 中将一个条目记录为 Critical 但我没有关联的 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

但是没有映射! Error中的错误日志 Warning中的警告日志 但 FailureAudit、Information 和 SuccessAudit 登录 Information

您知道我如何使用 EventLog.WriteEvent 记录关键事件吗?

我相信它只是由系统本身生成的:

Critical events are sent to the user in the form of an immediate message on the screen. Other event notifications are written to one of several event logs that record the information for future reference.

Source MSDN