unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: guix-devel@gnu.org
Subject: Re: Shepherd log rotation service
Date: Sat, 01 Jun 2024 15:35:34 +0200	[thread overview]
Message-ID: <87frtwpyzd.fsf@gnu.org> (raw)
In-Reply-To: <877cflu3zk.fsf@lease-up.com> (Felix Lechner's message of "Wed, 22 May 2024 10:54:23 -0700")

Hi,

Felix Lechner <felix.lechner@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	other threads:[~2024-06-01 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18 21:11 Shepherd log rotation service Ludovic Courtès
2024-05-22 17:54 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-01 13:35   ` Ludovic Courtès [this message]
2024-05-23 14:20 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-01 13:30   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frtwpyzd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=felix.lechner@lease-up.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).