Add default log retention settings#8815
Conversation
|
I think this should be a 7.x change to avoid changing behavior too much on a minor release. Auto deleting old log files may be seen as non-passive. Thoughts ? |
Do you mean per appender (slowlog, json, etc), not per log file? |
|
I would vote to bump to Since we support date or size, which ever comes first... i would assume a (mostly) healthy system would typically hit the date based roll over first. (and I think we will get better then 50% on un-healthy systems) |
|
@jordansissel, ah, yes. I meant per appender, not per log file. I'll edit the description. |
|
@jakelandis, bumped to 30 files. I agree that we should get >50% compression in most cases. |
I agree with your reasoning. Maybe for 6.x we can offer this as an alternative. Maybe ship a |
|
I don't see any tests added, and maybe that's ok (log4j configs maybe are too complicated to write solid tests for, for this pr). Can someone run a manual test and verify the retention settings work as expected (max 30 files, daily rotation, rotation at 100mb) ? |
|
Jenkins test this please |
15f3ab3 to
8ee32be
Compare
|
dan.hermann merged this into the following branches!
|
Relates to elastic#7842 Fixes elastic#8815
The default retention setting of 20 files was arrived at by assuming a conservative 50% compression ratio on rotated log files for a total of 1GB (20 files * 50% compression * 100MB max size). Note that the 1GB limit would apply per appender.
Relates to #7842