EventDefinition<TParam> Constructors

Definition

Overloads

EventDefinition<TParam>(EventId, LogLevel, Action<ILogger,TParam,Exception>)

Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs

Creates an event definition instance.

C#
public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception> logAction);

Parameters

eventId
EventId

The EventId.

level
LogLevel

The LogLevel at which the event will be logged.

logAction
Action<ILogger,TParam,Exception>

A cached delegate for logging the event.

Applies to

Entity Framework Core 2.2 and other versions
Product Versions
Entity Framework Core 2.0, 2.1, 2.2

EventDefinition<TParam>(EventId, LogLevel, String, Action<ILogger,TParam,Exception>)

Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs

Creates an event definition instance.

C#
public EventDefinition (Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception> logAction);

Parameters

eventId
EventId

The EventId.

level
LogLevel

The LogLevel at which the event will be logged.

eventIdCode
String

A string representing the code that should be passed to ConfigureWanings.

logAction
Action<ILogger,TParam,Exception>

A cached delegate for logging the event.

Applies to

Entity Framework Core 2.2 and Entity Framework Core 2.1
Product Versions
Entity Framework Core 2.1, 2.2

EventDefinition<TParam>(ILoggingOptions, EventId, LogLevel, String, Func<LogLevel,Action<ILogger,TParam,Exception>>)

Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs
Source:
EventDefinition%60.cs

Creates an event definition instance.

C#
public EventDefinition (Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions loggingOptions, Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Func<Microsoft.Extensions.Logging.LogLevel,Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception>> logActionFunc);
C#
public EventDefinition (Microsoft.EntityFrameworkCore.Diagnostics.ILoggingOptions loggingOptions, Microsoft.Extensions.Logging.EventId eventId, Microsoft.Extensions.Logging.LogLevel level, string eventIdCode, Func<Microsoft.Extensions.Logging.LogLevel,Action<Microsoft.Extensions.Logging.ILogger,TParam,Exception?>> logActionFunc);

Parameters

loggingOptions
ILoggingOptions

Logging options.

eventId
EventId

The EventId.

level
LogLevel

The LogLevel at which the event will be logged.

eventIdCode
String

A string representing the code that should be passed to ConfigureWarnings(Action<WarningsConfigurationBuilder>).

logActionFunc
Func<LogLevel,Action<ILogger,TParam,Exception>>

Function to create a cached delegate for logging the event.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0