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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id A92F1B4336 for ; Fri, 1 Dec 2023 12:14:17 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8A44115FDF for ; Fri, 1 Dec 2023 12:13:47 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 1 Dec 2023 12:13:46 +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 387D143595 for ; Fri, 1 Dec 2023 12:13:46 +0100 (CET) Date: Fri, 1 Dec 2023 12:13:45 +0100 From: Wolfgang Bumiller To: Lukas Wagner Cc: Proxmox Backup Server development discussion , Gabriel Goller Message-ID: References: <20231103112849.71953-1-g.goller@proxmox.com> <20231103112849.71953-2-g.goller@proxmox.com> <48fb398e-d7d4-4e7b-a313-057953b82aca@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <48fb398e-d7d4-4e7b-a313-057953b82aca@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.096 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 11:14:17 -0000 On Fri, Dec 01, 2023 at 10:56:47AM +0100, Lukas Wagner wrote: > Hello, > I'm currently evaluating how this crate could be used from the > proxmox-perl-rs bindings. > > The status quo there is that we initialize an envlogger, but that leads to > the problem that logs are only visible for tasks, since envlogger does log > to stdout (or was it stderr?). > To differentiate between 'daemon context' and 'fork worker context' we > obviously cannot rely on a tokio task-local var there. I'm not convinced we'll be able to keep tokio out of there for long - if only to block_on some futures via a current_thread runtime. > Maybe it would make sense to have an alternative mode (gated via > feature-flags) with a static flag, which is then set in > RestEnvironment::fork_worker via a setter? Sure. This can of course also be a follow up (I haven't looked over this version yet). > The dependency on tokio should then also be feature-gated, since we don't > want to have to pull in tokio as a dep for proxmox-perl-rs yet. 👍