public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Cc: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
Subject: [PATCH datacenter-manager v2 7/7] api: rename PROXMOX_DEBUG log variable to PDM_LOG
Date: Fri, 23 Oct 2026 13:31:18 +0200	[thread overview]
Message-ID: <20261023113120.332453-8-t.ellmenreich@proxmox.com> (raw)
In-Reply-To: <20261023113120.332453-1-t.ellmenreich@proxmox.com>

Update the variable used to set the log level for the privileged and
unprivileged datacenter-api. The old 'PROXMOX_DEBUG' variable is replaced by
'PDM_LOG' to match the pattern used by other products.

In the case that PROXMOX_DEBUG is still set, a warning will be emitted,
notifying the user that the environment variable is no longer in use.

Suggested-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
---
 server/src/bin/proxmox-datacenter-api/main.rs       | 7 ++++++-
 server/src/bin/proxmox-datacenter-privileged-api.rs | 9 ++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/server/src/bin/proxmox-datacenter-api/main.rs b/server/src/bin/proxmox-datacenter-api/main.rs
index 1c107b1f..9d04ba91 100644
--- a/server/src/bin/proxmox-datacenter-api/main.rs
+++ b/server/src/bin/proxmox-datacenter-api/main.rs
@@ -47,11 +47,16 @@ fn main() -> Result<(), Error> {
 
     server::env::sanitize_environment_vars();
 
-    proxmox_log::Logger::from_env("PROXMOX_DEBUG", LevelFilter::INFO)
+    proxmox_log::Logger::from_env("PDM_LOG", LevelFilter::INFO)
         .journald_on_no_workertask()
         .tasklog_pbs()
         .init()?;
 
+    // TODO: remove after a few versions
+    if std::env::var("PROXMOX_DEBUG").is_ok() {
+        proxmox_log::warn!("PROXMOX_DEBUG is deprecated, please use PDM_LOG instead");
+    }
+
     if std::env::args().nth(1).is_some() {
         bail!("unexpected command line parameters");
     }
diff --git a/server/src/bin/proxmox-datacenter-privileged-api.rs b/server/src/bin/proxmox-datacenter-privileged-api.rs
index 616d9e14..3ead7eb9 100644
--- a/server/src/bin/proxmox-datacenter-privileged-api.rs
+++ b/server/src/bin/proxmox-datacenter-privileged-api.rs
@@ -27,11 +27,18 @@ fn main() -> Result<(), Error> {
 
     server::env::sanitize_environment_vars();
 
-    proxmox_log::Logger::from_env("PROXMOX_DEBUG", LevelFilter::INFO)
+    proxmox_log::Logger::from_env("PDM_LOG", LevelFilter::INFO)
         .journald_on_no_workertask()
         .tasklog_pbs()
         .init()?;
 
+    // TODO: remove after a few versions
+    if std::env::var("PROXMOX_DEBUG").is_ok() {
+        proxmox_log::warn!(
+            "to set the log level, please use the PDM_LOG variable, as it has replaced PROXMOX_DEBUG"
+        );
+    }
+
     proxmox_product_config::init(pdm_config::api_user()?, pdm_config::priv_user()?);
 
     create_directories()?;
-- 
2.47.3





      parent reply	other threads:[~2026-10-23 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 11:31 [PATCH datacenter-manager/proxmox v2 0/7] log: allow finegrained control log levels Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH proxmox v2 1/7] log: replace per layer filtering with one global filter Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH proxmox v2 2/7] fix #6081: log: replace simple level filter with env filter Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH proxmox v2 3/7] log: add tests to the logger Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH proxmox v2 4/7] log: clean up of logger components Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH proxmox v2 5/7] rest-server: enable debug based on log level Thomas Ellmenreich
2026-10-23 11:31 ` [PATCH datacenter-manager v2 6/7] api: remove manual setting of REST server debug flag Thomas Ellmenreich
2026-10-23 11:31 ` Thomas Ellmenreich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261023113120.332453-8-t.ellmenreich@proxmox.com \
    --to=t.ellmenreich@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal