V8 Add retainedFileTimeLimit to serilog configuration #11091
PBHansen
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Serilog supports the option to add a retained file time limit to a rolling log file which determines how long it should be retained (using TimeSpan).
https://github.com/serilog/serilog-sinks-file/blob/764bb4a655b006fd59f1274c74d54d51a0dde79e/src/Serilog.Sinks.File/FileLoggerConfigurationExtensions.cs#L237
This could be quite useful if one wanted to retain log files for x months. My old solution was to keep x log files, but sometimes Umbraco creates several files on the same day, even if rolling interval is set to Day.
Beta Was this translation helpful? Give feedback.
All reactions