From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2K/7NeH6ImQwXwAASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 16:34:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4OesNeH6ImQ5vAAAauVa8A (envelope-from ) for ; Tue, 28 Mar 2023 16:34: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 8C84B1FD0F for ; Tue, 28 Mar 2023 16:34:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680014049; 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: content-transfer-encoding:content-transfer-encoding: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; bh=0vcG20zAhL+H/rpntSD24NV7t3TlgTLzc0GFLMQ8ezc=; b=ABfRj29gKFQ5c+Nbr8N3HtS/lnGEDeaj6xtghGgVIFg9m4eaOgq/nFQO0mzhY7kWkeIMSx Rhy+pcd0br6049O+9hafmiQ++n4uVdnbvhHIMIbHQccJXns+OWWdz+TSxARUSxfzCKJUAC ACf59Y9MK1/k2ikxPr/mNt4tfbDEWhwWuMuFfHRq5HhrFKO4ZuPiEgwN8z39ZBNx5VqhUF zJhnm0yeymaQEX0zyRQGHGlYo4Z+RmN+KSOParsE4p0t49RfLhoLxuGBFy/VK0fA03Zz9o n19oZPAdUrEshI4b3BACmWuyMpCELvHctl1x6382Y/bUt0Z+GRNc7kfVjEVFCg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680014049; a=rsa-sha256; cv=none; b=coempCghEUyyMc+92aUIp8uXx4DOC8pRjdo8odQLRjvUux1VaiMacdSGR7dDZuG6dyZZmi 6Qbpevf1UrbsmjimjPsJWDzEpTSKt3wNnJ6OvvcBTxbJEc8V37PWPEotlqNR4NC7PVSXbs sREkWl0VrpHxbaofymbD4zsmC6wotr9Aka64y2Bh/9U3CX9x8LgxumYTTG77nlLeUX0dgf PvYq7JCkCUE/UBEBO3JqKyB4ZlcCGH3eDN+/mI6dZOZv1Ab1GS0QttZwoUzeX4To0BHXaz DKYnkIy7aXbdhXQda51c9uMRlBJOpzXt+GMK9wIHaiuw8yO60gKHDc5ablNxeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phAOi-00076r-IT; Tue, 28 Mar 2023 10:34:05 -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 1phAOg-00072N-BC for guix-patches@gnu.org; Tue, 28 Mar 2023 10:34:02 -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 1phAOg-0007zx-1k for guix-patches@gnu.org; Tue, 28 Mar 2023 10:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phAOf-0002k9-TN for guix-patches@gnu.org; Tue, 28 Mar 2023 10:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62490] [PATCH] services: nginx: Make logging level configurable. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Mar 2023 14:34: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: Maxim Cournoyer Cc: 62490@debbugs.gnu.org, ludo@gnu.org, mail@cbaines.net Received: via spool by 62490-submit@debbugs.gnu.org id=B62490.168001399310482 (code B ref 62490); Tue, 28 Mar 2023 14:34:01 +0000 Received: (at 62490) by debbugs.gnu.org; 28 Mar 2023 14:33:13 +0000 Received: from localhost ([127.0.0.1]:50479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phANt-0002j0-0R for submit@debbugs.gnu.org; Tue, 28 Mar 2023 10:33:13 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:57674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phANr-0002is-5o for 62490@debbugs.gnu.org; Tue, 28 Mar 2023 10:33:11 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 9EF992041D; Tue, 28 Mar 2023 16:33:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 51CDA800A7; Tue, 28 Mar 2023 16:33:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wDyrpzZLTDjT; Tue, 28 Mar 2023 16:33:07 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id D4435800A3; Tue, 28 Mar 2023 16:33:06 +0200 (CEST) Message-ID: <156c2153-cca0-2f59-6ca8-edad4fb7e919@makinata.eu> Date: Tue, 28 Mar 2023 15:32:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US References: <87r0t9newh.fsf@gmail.com> From: Bruno Victal In-Reply-To: <87r0t9newh.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: X-Migadu-Queue-Id: 8C84B1FD0F X-Spam-Score: -2.03 X-Migadu-Spam-Score: -2.03 X-Migadu-Scanner: scn0.migadu.com 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 X-TUID: aQEqe2FAlp+M 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 . Cheers, Bruno