Enterprise library not logging severity correctly

橙三吉。 提交于 2019-12-01 12:56:09

The behavior you are seeing is part of the .NET API.

There is no level or severity of Critical in the EventLogEntryType Enumeration which is used to log to the EventLog. TraceEventType, which is used by Enterprise Library as well as the .NET tracing infrastructure, does support a Critical severity.

However, inside the System.Diagnostics.EventLogTraceListener, which is used to log to the EventLog, a Critical TraceEventType is converted to an Error EventLogEntryType.

In the Event Viewer there is a filter for Critical but it seems that this level is reserved for low level errors. E.g. kernel related.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!