[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63082: [PATCH v2 08/16] services: mpd: Do not rotate logs when using
From: |
Maxim Cournoyer |
Subject: |
bug#63082: [PATCH v2 08/16] services: mpd: Do not rotate logs when using syslog. |
Date: |
Sat, 29 Apr 2023 13:21:45 -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 07/17] services: mpd: Log to syslog by default., (continued)
- bug#63082: [PATCH v2 00/16] Improve out-of-the-box experience with mpd-service-type, Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 03/16] services: mpd: Rename %set-user-group to set-user-group., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 01/16] services: mpd: Add an 'update' action to trigger a database update., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 06/16] services: mpd; Refactor start slot directory initialization., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 02/16] services: mpd: Streamline mpd-user-sanitizer and mympd-user-sanitizer., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 04/16] services: mpd: Obsolete the 'group' field., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 05/16] services: mpd: List log-level in decreasing verbosity order in doc., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 11/16] services: mpd: Warn when the MPD user is not in the "audio" group., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 08/16] services: mpd: Do not rotate logs when using syslog.,
Maxim Cournoyer <=
- bug#63082: [PATCH v2 07/16] services: mpd: Log to syslog by default., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 12/16] services: mpd: Auto-detect mpd-output mixer type by default., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 09/16] services: mpd: Let Shepherd effect the user/group change., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 10/16] system: accounts: Export <user-account>., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 13/16] services: mpd: Obsolete 'environment-variables' field., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 15/16] services: mpd: Update basic example., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 14/16] services: mpd: Provision a default cache directory and set HOME., Maxim Cournoyer, 2023/04/29
- bug#63082: [PATCH v2 16/16] services: Avoid 'delete' overrides warning in audio module., Maxim Cournoyer, 2023/04/29