.NET 5 Seems to Not Work
Opened this issue · 2 comments
kenneymyers commented
Describe the bug
Implemented everything as described but no logs can be found in the portal.
To Reproduce
Steps to reproduce the behavior:
- Create a .NET 5 MVC Web App
- Add the necessary Nuget Packages
- Change program.cs as instructed
Run the app and you can see the new custom log but no entries are being written.
Expected behavior
I'm expecting .NET 5 to work just like .NET Core 3.1 should work.
spottedmahn commented
hello 👋 - did you ever get to the bottom of this & get it working?
spottedmahn commented
FYI, I was building a .NET 6 app & I missed builder.Host.UseSerilog(); // <-- Add this line
from the Serilog setup guide & that fixed my issue (plus the CloseOnFlush via try/finally
).