[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: services: mpd: Do not rotate logs when using syslog.
From: |
guix-commits |
Subject: |
04/09: services: mpd: Do not rotate logs when using syslog. |
Date: |
Wed, 26 Jul 2023 11:12:53 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 0db2fa1ac081f684eb15e4ef8561f6e2853527bd
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Apr 29 12:02:48 2023 -0400
services: mpd: Do not rotate logs when using syslog.
* gnu/services/audio.scm (mpd-log-rotation): Conditionlize based on the
value
of LOG-FILE.
---
gnu/services/audio.scm | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index f3c8fae23c..8a127d234b 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -581,12 +581,15 @@ appended to the configuration.")
(serialize-configuration configuration mpd-configuration-fields)))
(define (mpd-log-rotation config)
- (match-record config <mpd-configuration> (log-file)
- (log-rotation
- (files (list log-file))
- (post-rotate #~(begin
- (use-modules (gnu services herd))
- (with-shepherd-action 'mpd ('reopen) #f))))))
+ (match-record config <mpd-configuration>
+ (log-file)
+ (if (string=? "syslog" log-file)
+ '() ;nothing to do
+ (list (log-rotation
+ (files (list log-file))
+ (post-rotate #~(begin
+ (use-modules (gnu services herd))
+ (with-shepherd-action 'mpd ('reopen) #f))))))))
(define (mpd-shepherd-service config)
(match-record config <mpd-configuration>
@@ -674,10 +677,8 @@ MPD (PID ~a)." pid))
(extensions
(list (service-extension shepherd-root-service-type
(compose list mpd-shepherd-service))
- (service-extension account-service-type
- mpd-accounts)
- (service-extension rottlog-service-type
- (compose list mpd-log-rotation))))
+ (service-extension account-service-type mpd-accounts)
+ (service-extension rottlog-service-type mpd-log-rotation)))
(default-value (mpd-configuration))))
- branch master updated (67cc7b1635 -> 53138a393b), guix-commits, 2023/07/26
- 04/09: services: mpd: Do not rotate logs when using syslog.,
guix-commits <=
- 05/09: services: Avoid 'delete' overrides warning in audio module., guix-commits, 2023/07/26
- 06/09: system: accounts: Export <user-account>., guix-commits, 2023/07/26
- 09/09: services: mpd: Update basic example., guix-commits, 2023/07/26
- 03/09: services: mpd: Log to syslog by default., guix-commits, 2023/07/26
- 01/09: services: mpd: List log-level in decreasing verbosity order in doc., guix-commits, 2023/07/26
- 08/09: services: mpd: Provision a default cache directory and set HOME., guix-commits, 2023/07/26
- 07/09: services: mpd: Auto-detect mpd-output mixer type by default., guix-commits, 2023/07/26
- 02/09: services: mpd; Refactor start slot directory initialization., guix-commits, 2023/07/26