Serilog.Sinks.File is a Serilog sink library for writing log events to customizable text files. Install the NuGet package, then register the sink in the application's Serilog configuration. section 7.4.5
A typical file-sink configuration:
- Uses RollingInterval.Day to create one timestamped log file per day, such as log20220518.txt. section 7.4.5
Verify the sink
Run the project in Debug mode and inspect the project root. A Logs folder should contain a dated text file whose entries use the default or customized template. section 7.4.5
