IDiagnosticsLogger<TLoggerCategory>.GetLogBehavior Method

Definition

Checks if the given logLevel is enabled or the given event, and, if so, whether the event should be logged or thrown.

public Microsoft.EntityFrameworkCore.WarningBehavior GetLogBehavior (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel logLevel);
abstract member GetLogBehavior : Microsoft.Extensions.Logging.EventId * Microsoft.Extensions.Logging.LogLevel -> Microsoft.EntityFrameworkCore.WarningBehavior
Public Function GetLogBehavior (eventId As EventId, logLevel As LogLevel) As WarningBehavior

Parameters

eventId
EventId

The event ID that will be logged, if enabled.

logLevel
LogLevel

The logging level to which the event will be logged.

Returns

One of Log, Throw, or Ignore.

Applies to