[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63082: [PATCH v3 09/16] services: mpd: Do not rotate logs when using
From: |
Maxim Cournoyer |
Subject: |
bug#63082: [PATCH v3 09/16] services: mpd: Do not rotate logs when using syslog. |
Date: |
Fri, 5 May 2023 14:29:04 -0400 |
* gnu/services/audio.scm (mpd-log-rotation): Conditionlize based on the value
of LOG-FILE.
---
gnu/services/audio.scm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index c1295837b6..7fb4b8ccf7 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -558,12 +558,15 @@ (define (mpd-serialize-configuration 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>
--
2.39.2
- bug#63082: [PATCH v3 13/16] services: mpd: Auto-detect mpd-output mixer type by default., (continued)
- bug#63082: [PATCH v3 13/16] services: mpd: Auto-detect mpd-output mixer type by default., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 04/16] services: mpd: Rename %set-user-group to set-user-group., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 03/16] services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 07/16] services: mpd; Refactor start slot directory initialization., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 10/16] services: mpd: Let Shepherd effect the user/group change., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 09/16] services: mpd: Do not rotate logs when using syslog.,
Maxim Cournoyer <=
- bug#63082: [PATCH v3 14/16] services: mpd: Provision a default cache directory and set HOME., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 16/16] services: Avoid 'delete' overrides warning in audio module., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 15/16] services: mpd: Update basic example., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 06/16] services: mpd: List log-level in decreasing verbosity order in doc., Maxim Cournoyer, 2023/05/05
- bug#63082: [PATCH v3 05/16] services: mpd: Obsolete the 'group' field., Maxim Cournoyer, 2023/05/05