From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3CA351FF139 for ; Tue, 27 Jan 2026 18:34:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1E04B2635; Tue, 27 Jan 2026 18:34:33 +0100 (CET) Mime-Version: 1.0 Date: Tue, 27 Jan 2026 18:33:59 +0100 Message-Id: From: "Shan Shaji" To: "Lukas Wagner" , "Proxmox Datacenter Manager development discussion" , "Gabriel Goller" X-Mailer: aerc 0.20.0 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: 1769535174163 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.106 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 1:09 PM CET, Lukas Wagner wrote: > 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()`. Hey lukas, thank you so much for the detailed explanation. Makes sense to register both the tasklog_pbs() and stderr() layers. > 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). then should i rename the function to `tasklog` and update all call sites in both PDM and PBS? _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel