You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
I have an issue with WebHostExtensions.Run() using Console.WriteLine() instead of writing its log entries to an ILogger instance, just like this.
It seems pretty unintuitive that, after you already haved configured your logging etc. in the WebHostBuilder.Build() method, that the .Run() method after that should not be able to leverage this information.
So I would like to propose that the WebHostExtensions.Run() should try to resolve an ILogger from the host.Services just as it does with the hostingEnvironment and applicationLifetime, and use that if available. Only if there is no logger available it should fall back to writing to the Console directly.
What do you think about this? Could we make this happen?