-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log DI container creation exceptions #8
Comments
It has turned out that this approach is incomplete. We should dispose the logger, it turns out this is given in the documentation. |
You are right, thank you for pointing it out. I've decided to improve logging in the template based on the latest versions of Serilog extensions and documentation. |
I've updated the template just now - https://marketplace.visualstudio.com/items?itemName=sergey-tregub.asp-net-core-restful-service-template. Is the solution suitable for you? |
Thank you, Sergey. Looks like what I wanted. I am definitely going to test this solution when I start a new ASP.NET Core project. One note on the cafec9d commit, it seems that the |
You are right as always :) I forgot to remove ConfigureLogging after UseSerilog was added. |
I close the issue now. Feel free to open a new issue if you find any other problems. Thank you for your contribution. |
For instance, the following approach would work in the
Main()
method:Instead of
CreateHostBuilder(args).Build().Run();
doThe text was updated successfully, but these errors were encountered: