Enterprise library not logging severity correctly

后端 未结 1 681
说谎
说谎 2021-01-16 03:25

I have a problem with enterprise library 5. It\'s writing to the event log all the information I want it to write, however, it is not respecting the severity settings I conf

相关标签:
1条回答
  • 2021-01-16 03:58

    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.

    0 讨论(0)
提交回复
热议问题