Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3301018
D4590.id14972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4590.id14972.diff
View Options
diff --git a/services/blob/src/BlobServiceImpl.cpp b/services/blob/src/BlobServiceImpl.cpp
--- a/services/blob/src/BlobServiceImpl.cpp
+++ b/services/blob/src/BlobServiceImpl.cpp
@@ -9,6 +9,8 @@
#include "GetReactor.h"
#include "PutReactor.h"
+#include <glog/logging.h>
+
#include <iostream>
#include <memory>
@@ -90,7 +92,7 @@
database::DatabaseManager::getInstance().removeBlobItem(blobHash);
}
} catch (std::runtime_error &e) {
- std::cout << "error: " << e.what() << std::endl;
+ LOG(ERROR) << e.what();
status = grpc::Status(grpc::StatusCode::INTERNAL, e.what());
}
auto *reactor = context->DefaultReactor();
diff --git a/services/blob/src/server.cpp b/services/blob/src/server.cpp
--- a/services/blob/src/server.cpp
+++ b/services/blob/src/server.cpp
@@ -1,5 +1,8 @@
#include "BlobServiceImpl.h"
+#include "GlobalTools.h"
+
+#include <glog/logging.h>
#include <grpcpp/grpcpp.h>
#include <iostream>
@@ -18,7 +21,7 @@
builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
builder.RegisterService(&blobService);
std::unique_ptr<grpc::Server> server(builder.BuildAndStart());
- std::cout << "Server listening" << std::endl;
+ LOG(INFO) << "Server listening";
server->Wait();
}
@@ -27,6 +30,7 @@
} // namespace comm
int main(int argc, char **argv) {
+ comm::network::tools::InitLogging("blob");
comm::network::RunServer();
return 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 11:21 PM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535920
Default Alt Text
D4590.id14972.diff (1 KB)
Attached To
Mode
D4590: [services] Blob - Remove couts or replace them with glog
Attached
Detach File
Event Timeline
Log In to Comment