Closed
Description
Hello it's me again!
I couldn't use UseSerilog()
in my application for reasons delved into here (my application is complex using autofac and child containers, and my own library for multitenancy) - and my workaround was to do this instead:
webhostBuilder.ConfigureLogging((logging) =>
{
logging.ClearProviders();// clears microsoft providers registered by default like console.
logging.AddSerilog(Logger);
});
Which works. I raise this here because I thought maybe you could simplify the UseSerilog() implementation to call this method on the host builder instead, and then you could ditch your custom ILoggerFactory ?
Metadata
Metadata
Assignees
Labels
No labels