From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Thomas Ellmenreich" <t.ellmenreich@proxmox.com>,
<pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager 6/6] api: update logging variable
Date: Mon, 12 Oct 2026 14:15:59 +0200 [thread overview]
Message-ID: <DM2UP5BJCS98.107UEMZLDBPLO@proxmox.com> (raw)
In-Reply-To: <20261007074527.102419-7-t.ellmenreich@proxmox.com>
On Wed Oct 7, 2026 at 9:45 AM CEST, Thomas Ellmenreich wrote:
> Update the variable used to set the log level for the datacenter-api. The
> old 'PROXMOX_DEBUG' variable is replaced by 'PDM_LOG' to match the
> pattern used by all other products.
>
> If 'PROXMOX_DEBUG' is set in the environment, a warning is emitted so
> that administrators may switch to the new variable.
>
> Suggested-by: Lukas Wagner <l.wagner@proxmox.com>
> Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
Btw, there is also another daemon where this should be fixed in
server/src/bin/proxmox-datacenter-privileged-api.rs
(the privileged API daemon running as root)
All other binaries in the project already seem to be using "PDM_LOG".
As mentioned earlier, this might be something that could/should wait
until the next major release. Might be also fine to just change it right
away, the environment variable is not documented anywhere.
@Gabriel, do you have any opinions on the proxmox.git patches?
> ---
> server/src/bin/proxmox-datacenter-api/main.rs | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/server/src/bin/proxmox-datacenter-api/main.rs b/server/src/bin/proxmox-datacenter-api/main.rs
> index 2fc84c1d..fa8c2eb1 100644
> --- a/server/src/bin/proxmox-datacenter-api/main.rs
> +++ b/server/src/bin/proxmox-datacenter-api/main.rs
> @@ -47,11 +47,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"
> + );
> + }
> +
> let debug = proxmox_log::enabled!(Level::DEBUG);
>
> if std::env::args().nth(1).is_some() {
prev parent reply other threads:[~2026-10-12 12:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 7:45 [PATCH datacenter-manager/proxmox 0/6] log: allow finegrained control logging levels Thomas Ellmenreich
2026-10-07 7:45 ` [PATCH proxmox 1/6] log: replace per layer filtering by one global filter Thomas Ellmenreich
2026-10-12 12:16 ` Lukas Wagner
2026-10-12 13:20 ` Gabriel Goller
2026-10-07 7:45 ` [PATCH proxmox 2/6] fix #6081: log: replace simple level filter with env filter Thomas Ellmenreich
2026-10-12 12:16 ` Lukas Wagner
2026-10-07 7:45 ` [PATCH proxmox 3/6] log: cleanup of logger components Thomas Ellmenreich
2026-10-12 12:16 ` Lukas Wagner
2026-10-07 7:45 ` [PATCH proxmox 4/6] log: add tests to the logger Thomas Ellmenreich
2026-10-12 12:16 ` Lukas Wagner
2026-10-07 7:45 ` [PATCH datacenter-manager 5/6] api: set REST server debug level based on actual log level Thomas Ellmenreich
2026-10-12 12:16 ` Lukas Wagner
2026-10-07 7:45 ` [PATCH datacenter-manager 6/6] api: update logging variable Thomas Ellmenreich
2026-10-12 12:15 ` Lukas Wagner [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=DM2UP5BJCS98.107UEMZLDBPLO@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
--cc=t.ellmenreich@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