I've created a .NET Core 3.1 project using a Host, the IoC container with IServiceCollection
and implemented logging allover the place using the ILogger<T>
interface from Microsoft.Extensions.Logging
. I now need to implement more advanced logging and decided to use Serilog.
I assumed that it would be a breeze to switch from .NET built-in loggers to Serilog. But to my surprise, Serilog is using it's own ILogger
interface - bummer! So now I needed to update ALL places to use Serilog ILogger
, or to implement Serilog with a .NET Core ILogger<T>
interface.
My question is - is it really not possible to use Serilog with the ILogger interface in Microsoft.Extensions.Logging
? Would be so much smarter!