during some tests recently I wondered why a debug log-message was not printed, despite running with PBS_QEMU_DEBUG.
This patch sets the loglevel for the cli logger to debug if the variable is present and not-empty (see qemu_helper.rs for the other usage). Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com> --- proxmox-file-restore/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs index 87caadc4..74ef1979 100644 --- a/proxmox-file-restore/src/main.rs +++ b/proxmox-file-restore/src/main.rs @@ -585,7 +585,12 @@ where } fn main() { - init_cli_logger("PBS_LOG", "info"); + let loglevel = match std::env::var("PBS_QEMU_DEBUG") { + Ok(val) if !val.is_empty() => "debug", + _ => "info" + }; + + init_cli_logger("PBS_LOG", loglevel); let list_cmd_def = CliCommand::new(&API_METHOD_LIST) .arg_param(&["snapshot", "path"]) -- 2.30.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel