C# 如何在关键级别记录事件日志?

C# 如何在关键级别记录事件日志?,c#,wpf,event-log,C#,Wpf,Event Log,我想在EventViewer中将一个条目记录为关键条目,但我没有关联的EventLogType: System.Diagnostics.EventLog.WriteEntry("ApplicationName", message, System.Diagnostics.EventLogEntryType.Error); 根据MSDN,只有5个可能的值: Error Warning FailureAudit Information SuccessAudit 在EventViewer中,

我想在EventViewer中将一个条目记录为关键条目,但我没有关联的EventLogType:

System.Diagnostics.EventLog.WriteEntry("ApplicationName", message, System.Diagnostics.EventLogEntryType.Error);
根据MSDN,只有5个可能的值:

Error   
Warning 
FailureAudit
Information
SuccessAudit
在EventViewer中,有5个严重级别:

Critical
Error
Warning
Information
Verbose
但它没有被映射! 错误登录错误 警告登录到警告中 但FailureAudit、Information和SuccessAudit会登录信息


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

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

关键事件以屏幕上即时消息的形式发送给用户。其他事件通知将写入多个事件日志中的一个,这些日志记录信息以供将来参考


关于这个问题的答案可能重复是毫无帮助的。我相信关键事件只能由操作系统编写。可能重复