From: Bruno Victal <mirai@makinata.eu>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 62490@debbugs.gnu.org, ludo@gnu.org, mail@cbaines.net
Subject: [bug#62490] [PATCH] services: nginx: Make logging level configurable.
Date: Tue, 28 Mar 2023 15:32:56 +0100 [thread overview]
Message-ID: <156c2153-cca0-2f59-6ca8-edad4fb7e919@makinata.eu> (raw)
In-Reply-To: <87r0t9newh.fsf@gmail.com>
Hi Maxim,
On 2023-03-28 15:12, Maxim Cournoyer wrote:
> Bruno Victal <mirai@makinata.eu> writes:
>>
>> +(define-compile-time-procedure (assert-valid-log-level (level symbol?))
>> + "Ensure @var{level} is one of @code{'debug}, @code{'info}, @code{'notice},
>> +@code{'warn}, @code{'error}, @code{'crit}, @code{'alert}, or @code{'emerg}."
>> + (unless (memq level '(debug info notice warn error crit alert emerg))
>> + (raise
>> + (make-compound-condition
>> + (formatted-message (G_ "unknown log level '~a'") level)
>> + (condition (&error-location
>> + (location
>> + (source-properties->location procedure-call-location)))))))
>> + level)
>
> It's the first time I've seen define-compile-time-procedure in actual
> use. Is it really necessary? What happens if you omit wrapping
> assert-valid-log-level with it?
It will still work, provided the declaration is adjusted accordingly.
As for the reasons and benefits of using define-compile-time-procedure,
it's best explained at <https://logs.guix.gnu.org/guix/2023-03-20.log#131047>.
Cheers,
Bruno
next prev parent reply other threads:[~2023-03-28 14:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 18:51 [bug#62490] [PATCH] services: nginx: Make logging level configurable Bruno Victal
2023-03-28 14:12 ` Maxim Cournoyer
2023-03-28 14:32 ` Bruno Victal [this message]
2023-03-28 15:03 ` Maxim Cournoyer
2023-04-02 15:39 ` Ludovic Courtès
2023-04-11 17:12 ` bug#62490: " Maxim Cournoyer
2023-04-03 11:58 ` [bug#62490] [PATCH v2 1/2] " Bruno Victal
2023-04-03 11:58 ` [bug#62490] [PATCH v2 2/2] services: nginx: Add reopen action Bruno Victal
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=156c2153-cca0-2f59-6ca8-edad4fb7e919@makinata.eu \
--to=mirai@makinata.eu \
--cc=62490@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=mail@cbaines.net \
--cc=maxim.cournoyer@gmail.com \
/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).