Open
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. For example, "I'd like to do x but currently I can't because y [...]".
- At the beginning of the project, my configuration was like this,72 log files will be retained
configuration
.WriteTo.File($"Logs/log-.log",
rollingInterval: RollingInterval.Day,
retainedFileCountLimit: 72 ,
shared: false,
outputTemplate: temp);
- Since the log file is relatively large, compression is used for archiving.
my configuration was like this,2 log files will be retained and 70 compressed log files, ArchiveHooks
configuration
.WriteTo.File($"Logs/log-.log",
rollingInterval: RollingInterval.Day,
retainedFileCountLimit: 2,
shared: false, hooks: new ArchiveHooks(70),
outputTemplate: temp);
- Everything looked fine, but when I upgraded the program to a production environment, the program blocked on startup. Unable to complete startup after several minutes
- The first startup after the program upgrade requires compressing 70 files, which takes a lot of time. The program will be blocked until this deleting work is completed
Describe the solution you'd like
Archive files are usually compressed or copied, which takes a lot of time. During this period, the main program should not be blocked from starting. Async to remove old log file supported
Describe alternatives you've considered
A clear and concise description of any workarounds or alternative solutions you've considered.
Additional context
Add any other context or screenshots about the feature request here.