Hi,

Felix Lechner <felix.lech...@lease-up.com> skribis:

> I should will make an immediate dent in my 200 MB log file for Fcgiwrap,
> but not for an Rspamd file of similar size.  Also, my Nginx log file
> with 1.3 GB will remain unaffected.  Most significantly, it simplifies a
> lot of code.

Right.  I think we should augment ‘log-rotation-service’ so it can also
take care of “detached logs” (logs not created by #:log-file).  This is
necessary for nginx and others.

> Should log-rotation-service be called make-log-rotation-service?

I don’t think so.  :-)  This is consistent with ‘repl-service’ and
‘monitoring-service’.

> Should the key #:rotation-size-threshold be renamed to size-threshold?
> I'm not asking to change the name of the variable holding the default
> value.  The current key looks longer than needed in this code:

Hmm, not sure about this one.

> Also, is it good practice, in log-rotation-service, to use an optional
> argument (for event) together with keyword arguments?  Why not use
> keyword arguments all around?

It’s good practice—there’s no ambiguity at the language level.

Whether it’s good style is a different story.  My thinking here is that
‘event’ is the “most important” parameter, hence this special treatment.

> Finally, are there truly no (Shepherd) service requirements?  Or will
> any Shepherd service that uses #:log-file automatically make sure that
> the file-system is available?

Currently we use #:log-file in Guix System without worrying specifying
any ‘file-system-’ requirement.  The assumption is that /var/log is on
the root file system.

Dropping this assumption would complicate things…

(This is unrelated to the log rotation service though.)

Thanks,
Ludo’.

Reply via email to