Skip to content

Logging Not Working for ExecuteStoredProcedureAsync #55

@rwoodslap

Description

@rwoodslap

I am using the extensions for the framework and have been using the .NET Framework version until a recent project. I converted to the .NET Core version and noticed that a number of my calls to SQL are not being logged.

When I use the ExecuteStoredProcedureAsync call, nothing is logged.

Here is my setup:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    // Log SQL messages
    optionsBuilder.LogTo(Filter, LogData);
    base.OnConfiguring(optionsBuilder);
}
protected bool Filter(EventId eventId, LogLevel logLevel)
{
    return (eventId.Id == 20100 || eventId.Id == 20101 || eventId.Id == 20102);
}

protected void LogData(Microsoft.EntityFrameworkCore.Diagnostics.EventData eventData)
{
}

How can I get the logging to work properly?

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions