diff --git a/services/backup/src/Reactors/server/AddAttachmentsUtility.cpp b/services/backup/src/Reactors/server/AddAttachmentsUtility.cpp --- a/services/backup/src/Reactors/server/AddAttachmentsUtility.cpp +++ b/services/backup/src/Reactors/server/AddAttachmentsUtility.cpp @@ -1,5 +1,7 @@ #include "AddAttachmentsUtility.h" +#include + #include "BackupItem.h" #include "BlobPutClientReactor.h" #include "Constants.h" @@ -50,7 +52,7 @@ database::DatabaseManager::getInstance().putLogItem(*logItem); } } catch (std::runtime_error &e) { - std::cout << "error: " << e.what() << std::endl; + LOG(ERROR) << e.what(); status = grpc::Status(grpc::StatusCode::INTERNAL, e.what()); } return status; diff --git a/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp b/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp --- a/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp +++ b/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp @@ -105,7 +105,6 @@ this->holder, {}); database::DatabaseManager::getInstance().putBackupItem(backupItem); - std::cout << "done creating backup " << backupItem.getBackupID() << std::endl; } } // namespace reactor diff --git a/services/backup/src/Reactors/server/SendLogReactor.cpp b/services/backup/src/Reactors/server/SendLogReactor.cpp --- a/services/backup/src/Reactors/server/SendLogReactor.cpp +++ b/services/backup/src/Reactors/server/SendLogReactor.cpp @@ -5,8 +5,6 @@ #include "GlobalTools.h" #include "Tools.h" -#include - namespace comm { namespace network { namespace reactor { @@ -168,10 +166,6 @@ // as there may be multiple threads from the pool taking over here const std::lock_guard lock(this->reactorStateMutex); // TODO implement - std::cout << "receive logs done " - << this->getStatusHolder()->getStatus().error_code() << "/" - << this->getStatusHolder()->getStatus().error_message() - << std::endl; } } // namespace reactor diff --git a/services/backup/src/server.cpp b/services/backup/src/server.cpp --- a/services/backup/src/server.cpp +++ b/services/backup/src/server.cpp @@ -1,8 +1,10 @@ #include "BackupServiceImpl.h" +#include "GlobalTools.h" + +#include #include -#include #include #include @@ -22,7 +24,7 @@ builder.RegisterService(&backupService); // Finally assemble the server. std::unique_ptr server(builder.BuildAndStart()); - std::cout << "Server listening" << std::endl; + LOG(INFO) << "Server listening"; // Wait for the server to shutdown. Note that some other thread must be // responsible for shutting down the server for this call to ever return. @@ -33,6 +35,7 @@ } // namespace comm int main(int argc, char **argv) { + comm::network::tools::InitLogging("backup"); comm::network::RunServer(); return 0;