From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
To: "Ludovic Courtès" <ludo@gnu.org>, 54659@debbugs.gnu.org
Subject: [bug#54659] [PATCH 2/2] services: Add 'log-cleanup' service to '%base-services' for build logs.
Date: Fri, 01 Apr 2022 08:05:30 +0200 [thread overview]
Message-ID: <7073d9d64e8c68c943d4d2a03cb6fee2b6a0364e.camel@ist.tugraz.at> (raw)
In-Reply-To: <20220331212208.24385-2-ludo@gnu.org>
Am Donnerstag, dem 31.03.2022 um 23:22 +0200 schrieb Ludovic Courtès:
> * gnu/services/base.scm (%base-services): Add 'log-cleanup-service-
> type'
> instance.
> * doc/guix.texi (Log Rotation): Add example and mention '%base-
> services'.
> ---
> doc/guix.texi | 13 ++++++++++++-
> gnu/services/base.scm | 6 ++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index ad2763ec8a..eaaf829aa2 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -17645,7 +17645,18 @@ Some log files just need to be deleted
> periodically once they are old,
> without any other criterion and without any archival step. This is
> the
> case of build logs stored by @command{guix-daemon} under
> @file{/var/log/guix/drvs} (@pxref{Invoking guix-daemon}). The
> -@code{log-cleanup} service addresses this use case.
> +@code{log-cleanup} service addresses this use case. For example,
> +@code{%base-services} (@pxref{Base Services}) includes the
> following:
> +
> +@lisp
> +;; Periodically delete build logs more than 4 months old.
> +(service log-cleanup-service-type
> + (log-cleanup-configuration
> + (directory "/var/log/guix/drvs")
> + (expiry (* 4 30 24 3600))))
> +@end lisp
> +
> +That ensures build logs do not accumulate endlessly.
>
> @defvr {Scheme Variable} log-cleanup-service-type
> This is the type of the service to delete old logs. Its value must
> be a
> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index f278cb76de..ebaba524bc 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -2817,6 +2817,12 @@ (define %base-services
>
> (service rottlog-service-type)
>
> + ;; Periodically delete build logs more than 4 months old.
> + (service log-cleanup-service-type
> + (log-cleanup-configuration
> + (directory "/var/log/guix/drvs")
> + (expiry (* 4 30 24 3600))))
> +
This might be very nitpicky, but I think we should leave expiry
undefined so that the default of 6 months is applied. This way, if
there's a future decision that all logs should probably kept e.g. for
only 3 months, there is just one place to edit rather than two.
Cheers
next prev parent reply other threads:[~2022-04-01 6:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 21:20 [bug#54659] [PATCH 0/2] Periodically delete build logs Ludovic Courtès
2022-03-31 21:22 ` [bug#54659] [PATCH 1/2] services: Add 'log-cleanup-service-type' Ludovic Courtès
2022-03-31 21:22 ` [bug#54659] [PATCH 2/2] services: Add 'log-cleanup' service to '%base-services' for build logs Ludovic Courtès
2022-04-01 6:05 ` Liliana Marie Prikler [this message]
2022-04-01 15:41 ` Ludovic Courtès
2022-04-04 21:17 ` bug#54659: [PATCH 0/2] Periodically delete " 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7073d9d64e8c68c943d4d2a03cb6fee2b6a0364e.camel@ist.tugraz.at \
--to=liliana.prikler@ist.tugraz.at \
--cc=54659@debbugs.gnu.org \
--cc=ludo@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.