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: Mon, 12 Aug 2024 11:28:51 +0200	[thread overview]
Message-ID: <87plqeccoc.fsf@gnu.org> (raw)
In-Reply-To: <8734o271iu.fsf@lease-up.com> (Felix Lechner's message of "Sun, 21 Jul 2024 16:45:13 -0700")

Hi Felix,

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

> On Sat, May 18 2024, Ludovic Courtès wrote:
>
>> I’ve just pushed a simple log rotation service for Shepherd:
>
> I have a patch removing rottlog from all Guix "services" that use the
> Shepherd's :log-file feature, which works fine.  Do I need to provide a
> Guix "service" for the log rotation?

Nice, you’re ahead of me! :-)

Here’s how you can provide the log rotation service in your Guix System
config:

--8<---------------cut here---------------start------------->8---
(define log-rotation-service
  (simple-service 'shepherd-log-rotation
                  shepherd-root-service-type
                  (list (shepherd-service
                         (provision '(log-rotation))
                         (modules '((shepherd service log-rotation)))
                         (free-form #~(log-rotation-service))))))


(operating-system
  ;; …
  (services (append (list log-rotation-service) …)))
--8<---------------cut here---------------end--------------->8---

From there you can check ‘herd files log-rotation’ etc.

(In my config I was too lazy to remove rottlog, so I actually have
both…)

Ludo’.


      reply	other threads:[~2024-08-12  9:29 UTC|newest]

Thread overview: 7+ 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
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
2024-07-21 23:45 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-08-12  9:28   ` Ludovic Courtès [this message]

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=87plqeccoc.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).