public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] verify: cleanup logging order/messages
Date: Tue, 10 Nov 2020 13:52:50 +0100	[thread overview]
Message-ID: <20201110125250.3750178-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20201110125250.3750178-1-f.gruenbichler@proxmox.com>

otherwise we end up printing warnings before the start message..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 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<Vec<String>, 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 {
-- 
2.20.1





  reply	other threads:[~2020-11-10 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 12:52 [pbs-devel] [PATCH proxmox-backup 1/2] verify: log/warn on invalid owner Fabian Grünbichler
2020-11-10 12:52 ` Fabian Grünbichler [this message]
2020-11-10 13:14 ` [pbs-devel] applied-series: " Thomas Lamprecht

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=20201110125250.3750178-2-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal