From: Michal Rakowski Date: Fri, 4 Jun 2021 08:37:37 +0000 (+0200) Subject: Omit logging info about StorageGroup when it contains only 1 item X-Git-Tag: Release-11.3.2~504 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2720a48f9115ad2a3ed963c0b859cf5ec995cef;p=thirdparty%2Fbacula.git Omit logging info about StorageGroup when it contains only 1 item --- diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 8f782fdce..686d9af59 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -598,12 +598,15 @@ bool do_backup(JCR *jcr) } if(sd_job_started) { + /* No need to print msg when there is only 1 storage defined in the original group */ int group_size = jcr->store_mngr->get_origin_wstore_list()->size(); - Jmsg(jcr, M_INFO, 0, - "Storage \"%s\" was selected out of group of %d available storages. " - "StorageGroupPolicy used: \"%s\"", - jcr->store_mngr->get_wstore()->name(), group_size, - jcr->store_mngr->get_policy_name()); + if (group_size > 1) { + Jmsg(jcr, M_INFO, 0, + "Storage \"%s\" was selected out of group of %d available storages. " + "StorageGroupPolicy \"%s\" used\n", + jcr->store_mngr->get_wstore()->name(), group_size, + jcr->store_mngr->get_policy_name()); + } /* We can decrement not-used SDs since job was started against first available storage from the list */ jcr->store_mngr->dec_unused_wstores();