From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 27E361FF139 for ; Tue, 27 Jan 2026 13:09:17 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5BEF0211B3; Tue, 27 Jan 2026 13:09:40 +0100 (CET) Mime-Version: 1.0 Date: Tue, 27 Jan 2026 13:09:37 +0100 Message-Id: From: "Lukas Wagner" To: "Shan Shaji" , "Lukas Wagner" , "Proxmox Datacenter Manager development discussion" , "Gabriel Goller" X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260123172910.244121-1-s.shaji@proxmox.com> <20260123172910.244121-3-s.shaji@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769515712350 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.037 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH datacenter-manager 2/3] fix #7179: cli: admin: expose acme commands X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" On Tue Jan 27, 2026 at 12:14 PM CET, Shan Shaji wrote: >>> @@ -21,13 +22,17 @@ async fn run() -> Result<(), Error> { >>> &pdm_api_types::AccessControlConfig, >>> pdm_buildcfg::configdir!("/access"), >>> )?; >>> + proxmox_acme_api::init(pdm_buildcfg::configdir!("/acme"), false)?; >>> + >>> proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO) >>> + .stderr_on_no_workertask() >>> .stderr() >>> .init()?; >> >> Doing this actually prints all messages logged outside a workertask >> *twice*, since this adds two subscribers that will print to stdout. >> >> I think it would make more sense to: >> >> proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO) >> .tasklog_pbs() >> .stderr() >> .init()?; >> >> ... which should print *all* messages to stderr and messages from within >> a task log will also be stored in the task log. > > or could we keep the `stderr_on_no_workertask()` and remove the > `stderr`? No, then you would not get any log output from any code that runs within the worker, that would not be ideal. Maybe check out the defintion of these builder methods in proxmox-log/src/builder.rs, I think the doc comments makes the behavior a bit more clear. Since this is a CLI tool, I would say that every log message that is produced in the code should go to stderr in any case, as this might contain important information for interactive or scripted use cases - so `.stderr()`. As a bonus I think it's valuable to have logs of the worker tasks inside the task logs as well, hence the `.tasklog_pbs()` (maybe we should reconsider the name, this is not really PBS specific any more). > >> Maybe also ask Gabriel about these, he did a lot of work on logging. > > Will ask him about it. Thank You! > >> @Gabriel, would my proposal make sense here? >> _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel