unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Katherine Cox-Buday <cox.katherine.e@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Guix services, logging, and log rotation
Date: Wed, 17 Nov 2021 12:40:09 +0100	[thread overview]
Message-ID: <87tugbvwme.fsf@gnu.org> (raw)
In-Reply-To: <87bl2jwfih.fsf@gmail.com> (Katherine Cox-Buday's message of "Tue, 16 Nov 2021 22:52:06 -0600")

Hi,

Katherine Cox-Buday <cox.katherine.e@gmail.com> skribis:

> In the manual, SS10.8.3, it says:
>
>> (usually, services that produce log files already take care of that)
>
> I found an excellent example in =hpcguix-web-service-type=. It looks like you can achieve this by extending the =rottlog-service-type=?

Yes (info "(guix) Log Rotation").

> However, I noticed not all services allow users to specify where log files go, or setup log rotation. E.g.:
>
> #+BEGIN_SRC scheme
> (define syncthing-service-type
>   (service-type (name 'syncthing)
>                 (extensions (list (service-extension shepherd-root-service-type
>                                                      syncthing-shepherd-service)))
>                 (description
>                  "Run @uref{https://github.com/syncthing/syncthing, Syncthing}
> decentralized continuous file system synchronization.")))
> #+END_SRC
>
> Are these bugs?
>
> Why don't all services allow you to specify where logs go?

I think these are omissions rather than bugs.  But really, each daemon
has its own way of dealing with logging: some write to syslog (in which
case we don’t need to add a new log rotation rule), some just write to
stderr (like hpcguix-web, and in this case you need to pass #:log-file
to ‘make-forkexec-constructor’), some write to custom log files that may
or may not be configurable.

I think it’s nice in general for services to provide log rotation
entries, especially when they’re likely to produce verbose logs.

HTH,
Ludo’.


      reply	other threads:[~2021-11-17 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  4:52 Guix services, logging, and log rotation Katherine Cox-Buday
2021-11-17 11:40 ` 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=87tugbvwme.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cox.katherine.e@gmail.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).