Skip to content

Commit

Permalink
feat: write logs to a rolling file
Browse files Browse the repository at this point in the history
rolling on each day with no other limits. so that the logs are inifinitely written

Closes #73
  • Loading branch information
wgnf committed Apr 8, 2022
1 parent b7b6266 commit 50fbc5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CsvProc9000/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ private static ILogger ConfigureSerilogLogging(IConfiguration configuration)
.MinimumLevel.Information()
.Enrich.FromLogContext()
.WriteTo.Console()
.WriteTo.File("./logs/application-log.log")
.WriteTo.File(
"./logs/application-log.log",
fileSizeLimitBytes: null,
retainedFileCountLimit: null,
rollingInterval: RollingInterval.Day)
.ReadFrom.Configuration(configuration)
.CreateLogger();

Expand Down

0 comments on commit 50fbc5d

Please sign in to comment.