This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Offer a better way to configure logging for DI scenarios #397
Closed
Description
Currently, you have to inject ILoggerFactory
in your Configure
method and call AddDebug
/AddConsole
to register the listeners you want to add in your application. This is a weird pattern, that clearly differs from all the other stacks, that use IServiceCollection
extensions for that.
That would be great if we could do something like that:
public void ConfigureServices(IServiceCollection services) {
services.AddLogging(options => {
options.AddDebug();
options.AddConsole();
});
}
/cc @davidfowl @muratg
Metadata
Metadata
Assignees
Labels
No labels