Serilog Rolling File Logging: Intervals and Retention
Pass rollingInterval to the file sink and Serilog starts a new file on that schedule: .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Day) produces log20260824.txt, log20260825.txt, and so on. Two more options decide how long that stays manageable....
