From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 43203B4366 for ; Fri, 1 Dec 2023 15:48:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2583618F4C for ; Fri, 1 Dec 2023 15:48:23 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 1 Dec 2023 15:48:22 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D6801433AD for ; Fri, 1 Dec 2023 15:48:21 +0100 (CET) Message-ID: Date: Fri, 1 Dec 2023 15:48:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: de-AT, en-US From: Lukas Wagner To: Proxmox Backup Server development discussion , Gabriel Goller Reply-To: Proxmox Backup Server development discussion References: <20231103112849.71953-1-g.goller@proxmox.com> <20231103112849.71953-2-g.goller@proxmox.com> <48fb398e-d7d4-4e7b-a313-057953b82aca@proxmox.com> In-Reply-To: <48fb398e-d7d4-4e7b-a313-057953b82aca@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.007 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH proxmox 1/2] proxmox-log: added tracing infra X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2023 14:48:23 -0000 On 12/1/23 10:56, Lukas Wagner wrote: >> + >> +        let result = LOGGER.try_with(|logger| { >> +            log_to_file(&mut logger.borrow_mut(), level, &buf); >> +        }); >> +        if result.is_err() || *level == Level::ERROR { >                                                      ^ > Shouldn't this be configurable? > Or, alternatively would it make sense of drop this comparison and only > rely on the env var (e.g. PBS_LOG)? > Argh, misread this line before, sorry. I somehow read this as 'only errors should ever got to syslog', but in reality it's 'if task and error, it goes to both, syslog and stdout'. So it's fine as is, IMO. -- - Lukas