Serilog - delete old logs without RollingFile

153 Views Asked by At

I need to have a single dedicated log file for each execution of an application - which may occur many times a day.

I set a different name to the log file on each execution by adding timestamp by code. I cannot use RollingFile because it will create multiple logs during one execution - Or use the same log for multiple executions.

But without RollingFile I cannot have auto delete of old logs using retainedFileCountLimit.

0

There are 0 best solutions below