Closed tekbyts closed 8 months ago
I don't see anything that's replacing the bootstrap logger with the settings from the configuration, e.g. https://github.com/serilog/serilog-extensions-hosting/blob/2b8e22185718393e4cdcfb00a8d9fef85930762f/samples/SimpleServiceSample/Program.cs#L37 ?
My goal is to use Serilog for file logging in a Windows service using the .NET 8 Worker template.
While in the debug mode, I can see console logs. I just couldn't find the log file. While running as a windows service, I don't see the log file being created so i can't find the logs. And not sure where the console logs will appear when running as a service.
Here is my config and code. Am I missing something?
appsettings.json
Program.cs
WindowsBackgroundService.cs