Details
-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
77
Description
The TimeBasedRollingPolicy class is very convenient for complex applications, but it still leaves us with the task of manually deleting old log files. It would be very nice if, like FixedWindowRollingPolicy, TimeBasedRollingPolicy had an option to keep only up to n time windows.
E.g., I'd like to configure LOGBack to keep the last 30 days (or last 3 months, rotated monthly) of files with the TimeBasedRollingPolicy. I could use the FixedWindowROollingPolicy for this, but it's more cumbersome and I prefer to have the date in the file name.
Software should do the tricky stuff once for everybody to reuse. Thanks again for the excellent LOGBack, I can't rave enough about how much an improvement it, along with SLF4J, is.