Share via


EventDefinitionBase Class

Definition

Base class for event definitions.

public abstract class EventDefinitionBase
type EventDefinitionBase = class
Public MustInherit Class EventDefinitionBase
Inheritance
EventDefinitionBase
Derived

Remarks

See Implementation of database providers and extensions for more information and examples.

Constructors

EventDefinitionBase(EventId, LogLevel, String)

Creates an event definition instance.

EventDefinitionBase(EventId, LogLevel)

Creates an event definition instance.

EventDefinitionBase(ILoggingOptions, EventId, LogLevel, String)

Creates an event definition instance.

Properties

EventId

The EventId.

EventIdCode

A string representing the code that should be passed to ConfigureWarnings(Action<WarningsConfigurationBuilder>) to suppress this event as an error.

Level

The LogLevel at which the event will be logged.

WarningBehavior

The configured WarningBehavior.

Methods

GetLogBehavior<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>)

Gets the log behavior for this event. This determines whether it should be logged, thrown as an exception or ignored.

WarningAsError(String)

Returns a warning-as-error exception wrapping the given message for this event.

Applies to