Identifies the level of an event.
public enum class EventLevel
public enum EventLevel
type EventLevel =
Public Enum EventLevel
No level filtering is done on the event. When used as a level filter for enabling events, for example in EventListener.EnableEvents(), events of all levels will be included.
Critical 1This level corresponds to a critical error, which is a serious error that has caused a major failure.
Error 2This level adds standard errors that signify a problem.
Warning 3This level adds warning events (for example, events that are published because a disk is nearing full capacity).
Informational 4This level adds informational events or messages that are not errors. These events can help trace the progress or state of an application.
Verbose 5This level adds lengthy events or messages. It causes all events to be logged.
ExamplesThe following example shows how to use the Error
enumeration member to identify an error message. This example is part of a larger example provided for the EventSource class.
[Event(1, Message = "Application Failure: {0}", Level = EventLevel.Error, Keywords = Keywords.Diagnostic)]
public void Failure(string message) { WriteEvent(1, message); }
<[Event](1, Message:="Application Failure: {0}", Level:=EventLevel.Error, Keywords:=Keywords.Diagnostic)> _
Public Sub Failure(ByVal message As String)
WriteEvent(1, message)
End Sub
The following example shows how to use the Informational
enumeration member to identify an informational message. This example is part of a larger example provided for the EventSource class.
[Event(2, Message = "Starting up.", Keywords = Keywords.Perf, Level = EventLevel.Informational)]
public void Startup() { WriteEvent(2); }
<[Event](2, Message:="Starting up.", Keywords:=Keywords.Perf, Level:=EventLevel.Informational)> _
Public Sub Startup()
WriteEvent(2)
End Sub
The following example shows how to use the Verbose
enumeration member to identify a verbose message. This example is part of a larger example provided for the EventSource class.
[Event(7, Level = EventLevel.Verbose, Keywords = Keywords.DataBase)]
public void Mark(int ID) { if (IsEnabled()) WriteEvent(7, ID); }
<[Event](7, Level:=EventLevel.Verbose, Keywords:=Keywords.DataBase)> _
Public Sub Mark(ByVal ID As Integer)
If IsEnabled() Then
WriteEvent(7, ID)
End If
End Sub
The level signifies the severity of an event. Lower severity levels encompass higher severity levels. For example, Warning
includes the Error
and Critical
levels, which are higher in severity.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4