linq2db / linq2db.EntityFrameworkCore

Bring power of Linq To DB to Entity Framework Core projects
MIT License
462 stars 38 forks source link

Console logging with PomeloMySql #51

Closed sabvente closed 4 years ago

sabvente commented 4 years ago

Hello,

I have a working query logging for EF, but my recursive cte query with linq2db doesn't gets logged.

This is my appsettings.json (this is all log config as far as I know):

"Logging": {
    "LogLevel": {
      "Microsoft.EntityFrameworkCore.Database.Command": "Information"
    }
  }

How can I turn on console logging?

sdanyliv commented 4 years ago

Maybe I have missed something about EF Core Logging. But if you .UseLoggerFactory(MyLoggerFactory) in your DbContext - logging should work.

sdanyliv commented 4 years ago

Closing since there is no additional input.