logrotate(8) and copytruncate as default

Lennart Poettering mzerqung at 0pointer.de
Thu Jun 27 21:38:09 UTC 2013


On Thu, 27.06.13 15:46, Colin Walters (walters at verbum.org) wrote:

> On Fri, 2013-06-28 at 01:44 +0800, P J P wrote:
> > ----- Original Message -----
> > 
> > > From: Colin Walters <walters at verbum.org>
> > > Subject: Re: logrotate(8) and copytruncate as default
> > > It's worth noting that all of these problems go away with the systemd journal. 
> > 
> >   Oh, how does systemd rotate files?
> 
> The systemd-journald takes care of all of: receiving messages, writing
> them to storage, and rotating the storage.
> 
> (Although it is presently not possible to easily have rotation limits
> per-service and such, which is something fairly easy to do with sysvinit
> + logrotate).

Why would you want this? I mean, we rate-limit per-service anyway, so
the issue of one app flooding evreything else should be mostly
non-existant. And hence, what you are asking for is some policy control
about what to delete first, which only really matters if your disk space
is very very limited?

What we are looking into is adding a scheme where you can drop log
messages during rotation based on their log priorities. However, I am
really not sure I want to add anything beyond that, to make journald
into this configuration monster that embeds something akin to a
programming language to allow you to configure some complex policies for
low disk space cases. We are not rsyslog, after all...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list