Apologies if this is seen as a duplicate. This question is very similar but not the same. I'm interested in controlling the overall number of files (really I want to control the total size used for all logs).
I want the following from log back:
- For the current file, roll over every 12 hours or the file hits 100MB.
- No matter what, don't use more than 600MB of space total (I could also say this like: don't have more than 5 backup files).
The first point seems easy. I'm aware of TimeBasedRollingPolicy, and I know I can limit the per file size, but that's not enough. I need a way of limiting the total number of log files, not just the total number of time periods.