From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WL0lH+kBI2QAWgEASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 17:04:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YDQLH+kBI2SftgAA9RJhRA (envelope-from ) for ; Tue, 28 Mar 2023 17:04:09 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 29E4B53B4 for ; Tue, 28 Mar 2023 17:04:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phArk-0005xY-30; Tue, 28 Mar 2023 11:04:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phArj-0005wQ-27 for guix-patches@gnu.org; Tue, 28 Mar 2023 11:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phAri-00075H-FC for guix-patches@gnu.org; Tue, 28 Mar 2023 11:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phArh-0003ad-Rz for guix-patches@gnu.org; Tue, 28 Mar 2023 11:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62490] [PATCH] services: nginx: Make logging level configurable. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Mar 2023 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 62490@debbugs.gnu.org, ludo@gnu.org, mail@cbaines.net Received: via spool by 62490-submit@debbugs.gnu.org id=B62490.168001583713789 (code B ref 62490); Tue, 28 Mar 2023 15:04:01 +0000 Received: (at 62490) by debbugs.gnu.org; 28 Mar 2023 15:03:57 +0000 Received: from localhost ([127.0.0.1]:50511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phArc-0003aK-UJ for submit@debbugs.gnu.org; Tue, 28 Mar 2023 11:03:57 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:33385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phAra-0003a4-Mh for 62490@debbugs.gnu.org; Tue, 28 Mar 2023 11:03:55 -0400 Received: by mail-qt1-f175.google.com with SMTP id cr18so8328437qtb.0 for <62490@debbugs.gnu.org>; Tue, 28 Mar 2023 08:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680015829; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Tx9hGVWPNEeoKPrwapQ7knw4rZ1OGKazOI5PvCgBdOk=; b=UY2IrKys7JBf+W5a7pptB4K7HfTipQT6xVwqxqfTs03khbAU7D7aOR0QpqsVPN/mx1 vuguWIDwBHr/+d5TsQG6OrEvCc5IIjlrwbm3/BAJQBACBuZOsRUh+calKx0KUpkHNK5B sfJZp/fRcqStdfJ17lsZdgK3czfhE76uo52HcU/wjHtiBK7suDeAPOKAzjFZgjnpLegQ f7Il8o8SFGfQabXxxF64NPX776N4LjdqiK4LcdeRo9LVHk29TbaoMGr2ASNb5be5xUE3 DIomC16lpP9DdBuulBGKQryRrW+ofbt3n1RipyQC56ETuoP0TjUGoOJG+QNGDCjH4ars Vb8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680015829; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Tx9hGVWPNEeoKPrwapQ7knw4rZ1OGKazOI5PvCgBdOk=; b=wByjYyGG/rkfwVmcX4WRIGhM2ms0nC2Y8wdBtAD1P51N9+YQbX+x91lYH01hgruLOG TNjai+D4i8pMQTeQETB+rHSZbGt3RF/bPBAhC9uYmvEVW4DQmM8aJzownsEf7Z5B/sga Ouh26VBb1928qkGTQgW3qGSdUUxJ7vYnfij6/8zjjptXktKb1n133+owvp4zPwtq4eVg Ald/fuTkZvALmrDOHJJV6wSe2ckqOr6r6DCsWCYH/fNzS9VxvYc3x+/cxcgeCIKNlySj tK7cwAZ3raCfx5xQuqOld/MCCDR3tGdcV2rBc7ETiTmSoAEbgW4Ew58xQ9/MWRAoCzG1 hJKw== X-Gm-Message-State: AO0yUKVNzMicOnh3LxvHJm26Z6/I8fwqTVCpqI1PSwgv2R6/LvK7dUXs acEhadYRPiATffPYqY9dSXU= X-Google-Smtp-Source: AK7set+VCM3arj9tEdzS8p/capRwr1mv62oPoUVCqvP4hx1jhu8uyazYI4pURRHx0W13yod1vkHUag== X-Received: by 2002:ac8:5905:0:b0:3b9:a372:e456 with SMTP id 5-20020ac85905000000b003b9a372e456mr24766233qty.57.1680015829047; Tue, 28 Mar 2023 08:03:49 -0700 (PDT) Received: from hurd (dsl-205-151-56-156.b2b2c.ca. [205.151.56.156]) by smtp.gmail.com with ESMTPSA id s13-20020ac8758d000000b003e4e1ea3cb5sm2376260qtq.51.2023.03.28.08.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 08:03:48 -0700 (PDT) From: Maxim Cournoyer References: <87r0t9newh.fsf@gmail.com> <156c2153-cca0-2f59-6ca8-edad4fb7e919@makinata.eu> Date: Tue, 28 Mar 2023 11:03:45 -0400 In-Reply-To: <156c2153-cca0-2f59-6ca8-edad4fb7e919@makinata.eu> (Bruno Victal's message of "Tue, 28 Mar 2023 15:32:56 +0100") Message-ID: <87ilekor3i.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680015849; a=rsa-sha256; cv=none; b=Bp26SdhoxGl45Aez7pIpeWNvRm+IhZhMlEs00r+dCfzZmwsQ1pkUR0DcJQUs1vHn3kgoS0 8QatENs0QeEmywhuUqsbvfyHguFGka9GLc7NSXhkrN8dQdrxeL0dJ+gA3JbuceLbVnaGtO IFUKjOAODQMUq2wsJ5o+UF8CaOgCx7vJBMDkvZRT6p6glJKX2FdCKcNJvmfoVJ2OAqa3/i LJehIwlp5YI2R0WcDZdARQPA9zcS+k6F/JafKPELQlKqMadjM52MMyrxf0/BshCPieYF+A OyOKrHwoFE3TTmZnLfMh6SvxN4faKpTxwyUP/uqozhz4wM1E9dez5CWbnWj/Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=UY2IrKys; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680015849; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Tx9hGVWPNEeoKPrwapQ7knw4rZ1OGKazOI5PvCgBdOk=; b=qllHgpzs70+BvabH7ba+Z8M/9sUDvfVAW6Nq8BjJGiyjB2p82IdK2WM1ARW3WVdzPte39K ieMB7p256F00sYIg2kkF13m3fGi8eiVe2r94jmeXRd2eigLWRjhiTdGIPqxKCTbnuh+FsD hifqhYmdNily93me0wGHE8XWytqGHRWYh2c0izX3JszDBT2aBwrb4FxCyX5sbwH9WkONDp 0NHYyhxhmMPjLJChXz1koVuG7uXd814n6ixGbgqT+vMdHjD7LkaRULaaOv5LWrvYTtjFoA kub0/ycq8U4l2q6iL2GddDNC9Mlm1Ox33lK/9WXq0P5i8uWu5RlkgxY30Y38fw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=UY2IrKys; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.63 X-Spam-Score: -0.63 X-Migadu-Queue-Id: 29E4B53B4 X-TUID: qh+bsIpsYq2e OK, Bruno Victal writes: > Hi Maxim, > > On 2023-03-28 15:12, Maxim Cournoyer wrote: >> Bruno Victal 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 . I guess it's not actually useful here, since none of the fields thunked? As another note, the nginx-configuration record looks simple enough that perhaps it'd best be migrated to use the define-configuration method, which could be made as a prior commit to this change. As a benefit it'd validate the other field types as well. -- Thanks, Maxim