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 EBB931FF13B for ; Wed, 28 Jan 2026 14:55:15 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 984AF1330A; Wed, 28 Jan 2026 14:55:40 +0100 (CET) From: Shan Shaji To: pdm-devel@lists.proxmox.com Date: Wed, 28 Jan 2026 14:54:55 +0100 Message-ID: <20260128135457.245662-2-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260128135457.245662-1-s.shaji@proxmox.com> References: <20260128135457.245662-1-s.shaji@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769608440325 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.104 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [builder.rs, lib.rs] Subject: [pdm-devel] [PATCH proxmox 1/1] proxmox-log: deprecate `tasklog_pbs` and add `tasklog` function 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" The `tasklog_pbs` function was used for both PBS and PDM. The name of the function was specific to PBS. Since the function is no longer PBS-specific, introduce a new `tasklog` function and deprecate `tasklog_pbs`. Signed-off-by: Shan Shaji --- proxmox-log/src/builder.rs | 12 +++++++++++- proxmox-log/src/lib.rs | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/proxmox-log/src/builder.rs b/proxmox-log/src/builder.rs index 70616ce7..5d8bdcb3 100644 --- a/proxmox-log/src/builder.rs +++ b/proxmox-log/src/builder.rs @@ -35,7 +35,7 @@ impl Filter for NoWorkerTask { /// // The default PBS daemon/proxy logger /// Logger::from_env("PBS_LOG", LevelFilter::INFO) /// .journald_on_no_workertask() -/// .tasklog_pbs() +/// .tasklog() /// .init()?; /// # Ok(()) /// # } @@ -102,12 +102,22 @@ impl Logger { /// Print to the PBS tasklog if we are in a PBS workertask. /// /// Check if a LogContext exists and if it does, print to the corresponding task log file. + #[deprecated(note = "use `tasklog` instead")] pub fn tasklog_pbs(mut self) -> Logger { self.layer .push(TasklogLayer {}.with_filter(self.global_log_level).boxed()); self } + /// Print to the task log file if we are in a workertask. + /// + /// Check if a LogContext exists and if it does, print to the corresponding task log file. + pub fn tasklog(mut self) -> Logger { + self.layer + .push(TasklogLayer {}.with_filter(self.global_log_level).boxed()); + self + } + /// Print to stderr. /// /// Prints all the events to stderr with the compact format (no level, no timestamp). diff --git a/proxmox-log/src/lib.rs b/proxmox-log/src/lib.rs index 3a529cca..86e3f69e 100644 --- a/proxmox-log/src/lib.rs +++ b/proxmox-log/src/lib.rs @@ -162,7 +162,7 @@ fn get_env_variable(env_var: &str, default_log_level: LevelFilter) -> LevelFilte log_level } -/// Initialize tracing logger that prints to journald or stderr depending on if we are in a pbs +/// Initialize tracing logger that prints to journald or stderr depending on if we are in a worker /// task. /// /// Check the (tokio) LogContext and print to either journald or the Tasklog. @@ -173,13 +173,13 @@ pub fn init_logger( ) -> Result<(), anyhow::Error> { Logger::from_env(env_var_name, default_log_level) .journald_on_no_workertask() - .tasklog_pbs() + .tasklog() .init() } /// Initialize default tracing logger for CLI binaries. /// -/// Prints to stderr and to the tasklog if we are in a pbs workertask. +/// Prints to stderr and to the tasklog if we are in a workertask. #[deprecated(note = "Use the `Logger` builder instead")] pub fn init_cli_logger( env_var_name: &str, @@ -187,6 +187,6 @@ pub fn init_cli_logger( ) -> Result<(), anyhow::Error> { Logger::from_env(env_var_name, default_log_level) .stderr_on_no_workertask() - .tasklog_pbs() + .tasklog() .init() } -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel