diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-11-18 16:31:24 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-11-18 16:31:24 +0000 |
commit | 23da6f4a427f3e924a6122f476d19eff9dd6b55d (patch) | |
tree | 638b69b40a9874cced3632547a06b0a53f7ae079 | |
parent | 4879d2552b08ac5fdd2a0c4933634701ff982dae (diff) |
Cosmetic improvements to bbstored log message tagging.
-rw-r--r-- | lib/backupstore/HousekeepStoreAccount.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/backupstore/HousekeepStoreAccount.cpp b/lib/backupstore/HousekeepStoreAccount.cpp index 86eb1059..75feda7f 100644 --- a/lib/backupstore/HousekeepStoreAccount.cpp +++ b/lib/backupstore/HousekeepStoreAccount.cpp @@ -66,7 +66,7 @@ HousekeepStoreAccount::HousekeepStoreAccount(int AccountID, mCountUntilNextInterprocessMsgCheck(POLL_INTERPROCESS_MSG_CHECK_FREQUENCY) { std::ostringstream tag; - tag << "hk/" << BOX_FORMAT_ACCOUNT(mAccountID); + tag << "hk=" << BOX_FORMAT_ACCOUNT(mAccountID); mTagWithClientID.Change(tag.str()); } @@ -127,11 +127,14 @@ bool HousekeepStoreAccount::DoHousekeeping(bool KeepTryingForever) BackupStoreInfo::Load(mAccountID, mStoreRoot, mStoreDiscSet, true /* Read Only */)); - // Tag log output to identify account - std::ostringstream tag; - tag << "hk/" << BOX_FORMAT_ACCOUNT(mAccountID) << "/" << - info->GetAccountName(); - mTagWithClientID.Change(tag.str()); + // If the account has a name, change the logging tag to include it + if(!(info->GetAccountName().empty())) + { + std::ostringstream tag; + tag << "hk=" << BOX_FORMAT_ACCOUNT(mAccountID) << "/" << + info->GetAccountName(); + mTagWithClientID.Change(tag.str()); + } // Calculate how much should be deleted mDeletionSizeTarget = info->GetBlocksUsed() - info->GetBlocksSoftLimit(); |