help-guix
[Top][All Lists]
Advanced

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

Re: Examples of adding logs to rotate to the new log-rotation-service-ty


From: Simon Streit
Subject: Re: Examples of adding logs to rotate to the new log-rotation-service-type?
Date: Mon, 03 Feb 2025 20:18:26 +0100

Hello Zack,

"Zack Weinberg" <zack@owlfolio.org> writes:

> I cannot figure out from the documentation how I would add additional
> log files to be rotated to the new 'log-rotation-service-type'.  I can
> see how to *replace* the entire stock service configuration but not
> how to add some more files without losing the ones that are rotated by
> default.

You could try the following:

--8<---------------cut here---------------start------------->8---
(services
 (append
  (list
   (modify-services %desktop-services
     (log-rotation-service-type
      config =>
      (log-rotation-configuration
       (inherit config)
       (external-log-files '("/var/log/cups/access_log"
                             "/var/log/cups/error_log"
                             "/var/log/cups/page_log"))))))))
--8<---------------cut here---------------end--------------->8---

With modify-services the contents of %base-services or %desktop-services
are modified.

A more thorough explanation can be found here:

[1] 
https://guix.gnu.org/manual/devel/en/html_node/Using-the-Configuration-System.html#System-Services


Kind regards

-- 
Simon



reply via email to

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