On Tue, Feb 04, 2025 at 10:32:55AM +0100, Chris Hofstaedtler wrote: > On Tue, Feb 04, 2025 at 12:33:04AM +0000, Andrew Bower wrote: > > > > Surely it depends - some thing are highly distro-specific. The amount of > > detritus that accumulates in upstream contrib directories over the > > years... scripts that new integrators would surely rather rewrite for > > their own context. > > I just don't see why different distros need to come up with > different log rotating strategies. If one distro does the work, then > all can and should benefit. Also it will be less surprising for > upstream, when they introduce a rotation-with-purging concept.
Funnily enough that was my initial intention - add pruning to and/or alongside the rotate operation upstream. The reason I didn't was because I thought it was a bit late to co-ordinate at this stage and because I thought that would be vulnerable to the criticism of "why are you doing this task in C that is a natural fit for a system script". Food for thought though - I'll look into it. > > > > What do we think of that idea? It seems logical - no point in rotating > > > > tiny files! > > > > > > It's a trade off to what should be kept. If you have strict > > > requirements on how many days can be kept, then also small files > > > must be treated. > > > > Not sure what you're suggesting there, I mean that there's no point in > > splitting the master log file into tiny fragments in the first place, > > not that they shouldn't be kept - to the contrary! I don't think we have > > to be too tight on the storage, just to be bounded, not be pathological > > and not leave a dog's breakfast on the user's filesystem! > > I'm saying that in some jurisdictions you cannot keep such logs > longer than X days. If you skip over small files, you will keep them > longer than X days. Ah yes, then that makes sense. Max age.