Format Serilog Entity Framework command text to seq

Solution 1:

change q.LogTo(Log.Logger.Information, Microsoft.Extensions.Logging.LogLevel.Information); to

q.LogTo((e, l) => e==RelationalEventId.CommandExecuted, a =>
{
    CommandEventData cmdData = (CommandEventData)a;
    Log.Logger
    .Warning("Command Executed : {Command}", cmdData.Command.CommandText);
});
q.UseSqlServer(Configuration.GetConnectionString("db"));

you can filter your log with RelationalEventId class