EntityFrameworkExtras
EntityFrameworkExtras copied to clipboard
Logging Not Working for ExecuteStoredProcedureAsync
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<T> 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?