Hello! Ludovic Courtès <l...@gnu.org> skribis:
> I recently pushed a ‘wip-syslogd’ branch in the Shepherd, which should > be ready to merge in ‘devel’ in the coming days. It implements an > in-process “system log” service that does the same job as good’ol > syslogd as currently used in Guix System (info "(inetutils) syslogd > invocation"). This is now part of the ‘devel’ branch. This is pretty much the last feature I wanted to have for 1.0. If you want to use this new ‘system-log’ service instead of syslogd, here’s how you can change your system configuration: --8<---------------cut here---------------start------------->8--- (define system-log-service-type (shepherd-service-type 'shepherd-system-log (const (shepherd-service (documentation "Shepherd's built-in system log (syslogd).") (provision '(system-log syslogd)) (modules '((shepherd service system-log))) (free-form #~(system-log-service)))) #t (description "Shepherd's built-in system log (syslogd)."))) (operating-system ;; … (services (cons* (service system-log-service-type) ;; … (modify-services %desktop-services ;; … (delete syslog-service-type))))) ;replaced by the Shepherd's --8<---------------cut here---------------end--------------->8--- You need to be using the Shepherd from the ‘devel’ branch of course; see the instructions in the Shepherd’s ‘README’ for this. Once running, it gives something like this: --8<---------------cut here---------------start------------->8--- $ sudo /run/current-system/profile/bin/herd status syslogd Status of system-log: It is running since Sun 11 Aug 2024 11:23:40 PM CEST (40 hours ago). Running value is "#<system-log 7fc04762de00>". It is enabled. Provides: system-log syslogd. Will not be respawned. Log files: /var/log/messages /dev/tty12 /var/log/debug /var/log/secure. Recent messages: 2024-08-13 14:47:29 localhost shepherd[1]: service names: 72; heap: 36.89 MiB; file descriptors: 47 2024-08-13 15:00:00 localhost shepherd[1]: Timer 'gc' spawned process 16427. 2024-08-13 15:00:00 localhost shepherd[1]: Registering new logger for gc. 2024-08-13 15:00:00 localhost shepherd[1]: [guix] guix gc: already 10699.16 MiBs available on /gnu/store, nothing to do 2024-08-13 15:00:00 localhost shepherd[1]: Process 16427 of timer 'gc' terminated with status 0 after 0 seconds. 2024-08-13 15:07:29 localhost shepherd[1]: service names: 72; heap: 36.89 MiB; file descriptors: 47 2024-08-13 15:27:29 localhost shepherd[1]: service names: 72; heap: 36.89 MiB; file descriptors: 47 2024-08-13 15:47:29 localhost shepherd[1]: service names: 72; heap: 36.89 MiB; file descriptors: 47 2024-08-13 15:50:53 localhost sudo: ludo : TTY=pts/0 ; PWD=/home/ludo/src/guix ; USER=root ; COMMAND=/run/current-system/profile/bin/herd status syslogd 2024-08-13 15:50:53 localhost sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000) --8<---------------cut here---------------end--------------->8--- And it’s now integrated with the new ‘log-rotation’ service: --8<---------------cut here---------------start------------->8--- $ sudo herd files log-rotation /var/log/mcron.log mcron /var/log/messages system-log /dev/tty12 system-log /var/log/debug system-log /var/log/secure system-log /var/log/guix-publish.log guix-publish /var/log/avahi-daemon.log avahi-daemon /var/log/dbus-daemon.log dbus-system /var/log/ntpd.log ntpd /var/log/guix-daemon.log guix-daemon --8<---------------cut here---------------end--------------->8--- Ludo’.