mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-20 14:03:53 +03:00
file-restore: set loglevel considering PBS_QEMU_DEBUG
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.ivanov@proxmox.com>
This commit is contained in:
parent
ce3f15aeac
commit
39531dfc80
@ -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"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user