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 6/7] api: remove manual setting of REST server debug flag
Date: Fri, 23 Oct 2026 13:31:17 +0200 [thread overview]
Message-ID: <20261023113120.332453-7-t.ellmenreich@proxmox.com> (raw)
In-Reply-To: <20261023113120.332453-1-t.ellmenreich@proxmox.com>
Previously the REST server would be set to debug if the PROXMOX_DEBUG
environment variable was set. Now the server itself checks the enabled
log level and enables the debug flag accordingly.
This means that users will now have to set the PROXMOX_DEBUG variable to
debug for the REST server to enable its debug flag. Additionally,
setting the debug log level for proxmox_rest_server::connection
specifically will now also trigger the debug flag to be set, allowing
for greater control.
Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
---
server/src/bin/proxmox-datacenter-api/main.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/server/src/bin/proxmox-datacenter-api/main.rs b/server/src/bin/proxmox-datacenter-api/main.rs
index eac1585b..1c107b1f 100644
--- a/server/src/bin/proxmox-datacenter-api/main.rs
+++ b/server/src/bin/proxmox-datacenter-api/main.rs
@@ -47,8 +47,6 @@ fn main() -> Result<(), Error> {
server::env::sanitize_environment_vars();
- let debug = std::env::var("PROXMOX_DEBUG").is_ok();
-
proxmox_log::Logger::from_env("PROXMOX_DEBUG", LevelFilter::INFO)
.journald_on_no_workertask()
.tasklog_pbs()
@@ -70,7 +68,7 @@ fn main() -> Result<(), Error> {
proxmox_product_config::init(pdm_config::api_user()?, pdm_config::priv_user()?);
let app = server::context::init()?;
- proxmox_async::runtime::main(run(app, debug))
+ proxmox_async::runtime::main(run(app))
}
async fn get_index_future(env: RestEnvironment, parts: Parts) -> Response<proxmox_http::Body> {
@@ -145,7 +143,7 @@ async fn get_index_future(env: RestEnvironment, parts: Parts) -> Response<proxmo
resp
}
-async fn run(app: PdmApplication, debug: bool) -> Result<(), Error> {
+async fn run(app: PdmApplication) -> Result<(), Error> {
auth::init(false);
proxmox_acme_api::init(configdir!("/acme"), false)?;
@@ -229,7 +227,7 @@ async fn run(app: PdmApplication, debug: bool) -> Result<(), Error> {
}
})?;
- let connections = proxmox_rest_server::connection::AcceptBuilder::new().debug(debug);
+ let connections = proxmox_rest_server::connection::AcceptBuilder::new();
let server = proxmox_daemon::server::create_daemon(
PDM_LISTEN_ADDR,
move |listener| {
--
2.47.3
next prev 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 ` Thomas Ellmenreich [this message]
2026-10-23 11:31 ` [PATCH datacenter-manager v2 7/7] api: rename PROXMOX_DEBUG log variable to PDM_LOG Thomas Ellmenreich
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-7-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.