EventDefinitionBase.GetLogBehavior<TLoggerCategory> Method

Definition

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

C#
public virtual Microsoft.EntityFrameworkCore.WarningBehavior GetLogBehavior<TLoggerCategory> (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<TLoggerCategory> logger) where TLoggerCategory : Microsoft.EntityFrameworkCore.Diagnostics.LoggerCategory<TLoggerCategory>, new();

Type Parameters

TLoggerCategory

The DbLoggerCategory.

Parameters

logger
IDiagnosticsLogger<TLoggerCategory>

The logger to which the event would be logged.

Returns

Whether the event should be logged, thrown as an exception or ignored.

Applies to

Product Versions
Entity Framework Core 2.1, 2.2, 3.0, 3.1