From 1011fb552bea0a2f24ae2ef1e988b93fa68b67c0 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Wed, 21 Apr 2021 15:18:07 +0200 Subject: [PATCH] file-restore: print warnings on stderr as we print JSON on stdout to be parsed Signed-off-by: Stefan Reiter --- src/bin/proxmox_file_restore/block_driver_qemu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox_file_restore/block_driver_qemu.rs b/src/bin/proxmox_file_restore/block_driver_qemu.rs index 607d7d8e..c9142129 100644 --- a/src/bin/proxmox_file_restore/block_driver_qemu.rs +++ b/src/bin/proxmox_file_restore/block_driver_qemu.rs @@ -94,7 +94,7 @@ async fn cleanup_map(map: &mut HashMap) -> bool { if res.is_err() { // VM is not reachable, remove from map and inform user to_remove.push(name.clone()); - println!( + eprintln!( "VM '{}' (pid: {}, cid: {}) was not reachable, removing from map", name, state.pid, state.cid ); @@ -129,7 +129,7 @@ async fn ensure_running(details: &SnapRestoreDetails) -> Result { - println!("stale VM detected, restarting ({})", err); + eprintln!("stale VM detected, restarting ({})", err); // VM is dead, restart let vms = start_vm(vm.cid, details).await?; new_cid = vms.cid;