Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3701831
D4589.id14760.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4589.id14760.diff
View Options
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 <glog/logging.h>
+
#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 <iostream>
-
namespace comm {
namespace network {
namespace reactor {
@@ -160,10 +158,6 @@
// as there may be multiple threads from the pool taking over here
const std::lock_guard<std::mutex> 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 <grpcpp/grpcpp.h>
+#include <glog/logging.h>
-#include <iostream>
#include <memory>
#include <string>
@@ -22,7 +24,7 @@
builder.RegisterService(&backupService);
// Finally assemble the server.
std::unique_ptr<grpc::Server> 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;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 5:52 PM (4 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2821460
Default Alt Text
D4589.id14760.diff (2 KB)
Attached To
Mode
D4589: [services] Backup - Remove couts or replace them with glog
Attached
Detach File
Event Timeline
Log In to Comment