From 9f9a661b1a2ad8389dde239a18fb783c584019df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 10 Nov 2020 13:52:50 +0100 Subject: [PATCH] verify: cleanup logging order/messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise we end up printing warnings before the start message.. Signed-off-by: Fabian Grünbichler --- src/backup/verify.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/backup/verify.rs b/src/backup/verify.rs index 512a3805..1eccdd67 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -498,13 +498,10 @@ pub fn verify_all_backups( ) -> Result, Error> { let mut errors = Vec::new(); + task_log!(worker, "verify datastore {}", datastore.name()); + if let Some(owner) = &owner { - task_log!( - worker, - "verify datastore {} - limiting to backups owned by {}", - datastore.name(), - owner - ); + task_log!(worker, "limiting to backups owned by {}", owner); } let filter_by_owner = |group: &BackupGroup| { @@ -545,8 +542,7 @@ pub fn verify_all_backups( Err(err) => { task_log!( worker, - "verify datastore {} - unable to list backups: {}", - datastore.name(), + "unable to list backups: {}", err, ); return Ok(errors); @@ -566,7 +562,7 @@ pub fn verify_all_backups( // start with 64 chunks since we assume there are few corrupt ones let corrupt_chunks = Arc::new(Mutex::new(HashSet::with_capacity(64))); - task_log!(worker, "verify datastore {} ({} snapshots)", datastore.name(), snapshot_count); + task_log!(worker, "found {} snapshots", snapshot_count); let mut done = 0; for group in list {