guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guix services, logging, and log rotation


From: Katherine Cox-Buday
Subject: Guix services, logging, and log rotation
Date: Tue, 16 Nov 2021 22:52:06 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hey Guix!

I'm slowly working on contributing rsyslog with a Guix service. I have just 
arrived at trying to allow the user to specify where the Shepherd service sends 
its log file, and I began thinking about log rotation.

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=?

#+BEGIN_SRC scheme
  (define hpcguix-web-service-type
    (service-type
     (name 'hpcguix-web)
     (description "Run the hpcguix-web server.")
     (extensions
      (list (service-extension account-service-type
                               (const %hpcguix-web-accounts))
            (service-extension activation-service-type
                               (const %hpcguix-web-activation))
            (service-extension rottlog-service-type
                               (const %hpcguix-web-log-rotations))
            (service-extension shepherd-root-service-type
                               (compose list hpcguix-web-shepherd-service))))))
#+END_SRC

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 guess if no log location is specified, it just goes in the master shepherd 
log which is rotated?

Thank you,
--
Katherine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]