From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Yarl Baudig <yarl-baudig@mailoo.org>
Cc: 71735-done@debbugs.gnu.org
Subject: bug#71735: [PATCH] services: mpd: fix log to file
Date: Sun, 23 Jun 2024 21:45:23 -0400 [thread overview]
Message-ID: <87v81z9kr0.fsf@gmail.com> (raw)
In-Reply-To: <20240623141657.61044-1-yarl-baudig@mailoo.org> (Yarl Baudig's message of "Sun, 23 Jun 2024 16:15:58 +0200")
Hi Yarl,
Yarl Baudig <yarl-baudig@mailoo.org> writes:
> (match value (%unset-value ...)) is equivalent here to
> (match value (_ ...)). Even if you set 'log-file to some path, it's always
> "syslog" in the configuration file.
Interesting! It seems like using a variable in the pattern doesn't work
as I had expected... Thanks for the fix.
> * gnu/services/audio.scm (mpd): fix buggy 'match'.
> ---
> gnu/services/audio.scm | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
> index ae991ced4d..2c8af138e7 100644
> --- a/gnu/services/audio.scm
> +++ b/gnu/services/audio.scm
> @@ -251,16 +251,12 @@ (define (mpd-group-sanitizer value)
> (configuration-field-error #f 'group value))))
>
> (define (mpd-log-file-sanitizer value)
> - (match value
> - (%unset-value
> - ;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is
> - ;; supposed to cause logging to happen via systemd (elogind provides a
> - ;; compatible interface), this doesn't work (nothing gets logged); use
> - ;; syslog instead.
> - "syslog")
> - ((? string?)
> - value)
> - (_ (configuration-field-error #f 'log-file value))))
> + ;; XXX: While leaving the 'sys_log' option out of the mpd.conf file is
> + ;; supposed to cause logging to happen via systemd (elogind provides a
> + ;; compatible interface), this doesn't work (nothing gets logged); use
> + ;; syslog instead.
> + (let ((value (maybe-value value "syslog")))
> + (if (string? value) value (configuration-field-error #f 'log-file value))))
Applied, closing!
--
Thanks,
Maxim
prev parent reply other threads:[~2024-06-24 1:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-23 14:15 [bug#71735] [PATCH] services: mpd: fix log to file Yarl Baudig via Guix-patches via
2024-06-24 1:45 ` Maxim Cournoyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v81z9kr0.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=71735-done@debbugs.gnu.org \
--cc=yarl-baudig@mailoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).