diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-09 22:15:25 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-09 22:15:25 +0000 |
commit | e0d11ae476981fd56229b4ccffdd30166361548b (patch) | |
tree | 1454c0ef13ea79acc495f10ca79de31ee613e9ab /lib/backupstore | |
parent | cd45df502bf91e550692d9930c6aaffc137eaadf (diff) |
Remove the global logging level.
It's incompatible with having a logger that logs everything, regardless of
the global log level.
Diffstat (limited to 'lib/backupstore')
-rw-r--r-- | lib/backupstore/BackupCommands.cpp | 2 | ||||
-rw-r--r-- | lib/backupstore/StoreTestUtils.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/backupstore/BackupCommands.cpp b/lib/backupstore/BackupCommands.cpp index 2d927358..8b485d0c 100644 --- a/lib/backupstore/BackupCommands.cpp +++ b/lib/backupstore/BackupCommands.cpp @@ -298,7 +298,7 @@ std::auto_ptr<BackupProtocolMessage> BackupProtocolGetObject::DoCommand(BackupPr // Check the object exists if(!rContext.ObjectExists(mObjectID)) { - return std::auto_ptr<BackupProtocolMessage>(new BackupProtocolSuccess(NoObject)); + return PROTOCOL_ERROR(Err_DoesNotExist); } // Open the object diff --git a/lib/backupstore/StoreTestUtils.cpp b/lib/backupstore/StoreTestUtils.cpp index a5dbc28f..b1c8e424 100644 --- a/lib/backupstore/StoreTestUtils.cpp +++ b/lib/backupstore/StoreTestUtils.cpp @@ -34,7 +34,8 @@ bool create_account(int soft, int hard) Configuration::LoadAndVerify ("testfiles/bbstored.conf", &BackupConfigFileVerify, errs)); BackupStoreAccountsControl control(*config); - Logging::Guard guard(Log::WARNING); + + Logger::LevelGuard guard(Logging::GetConsole(), Log::WARNING); int result = control.CreateAccount(0x01234567, 0, soft, hard); TEST_EQUAL(0, result); return (result == 0); @@ -47,7 +48,7 @@ bool delete_account() Configuration::LoadAndVerify ("testfiles/bbstored.conf", &BackupConfigFileVerify, errs)); BackupStoreAccountsControl control(*config); - Logging::Guard guard(Log::WARNING); + Logger::LevelGuard guard(Logging::GetConsole(), Log::WARNING); TEST_THAT_THROWONFAIL(control.DeleteAccount(0x01234567, false) == 0); return true; } @@ -204,7 +205,7 @@ bool check_num_blocks(BackupProtocolCallable& Client, int Current, int Old, int check_account_for_errors(Log::Level log_level) { - Logging::Guard guard(log_level); + Logger::LevelGuard guard(Logging::GetConsole(), log_level); Logging::Tagger tag("check fix", true); Logging::ShowTagOnConsole show; std::string errs; |