Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3301303
D4591.id14762.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D4591.id14762.diff
View Options
diff --git a/services/lib/src/client-base-reactors/ClientBidiReactorBase.h b/services/lib/src/client-base-reactors/ClientBidiReactorBase.h
--- a/services/lib/src/client-base-reactors/ClientBidiReactorBase.h
+++ b/services/lib/src/client-base-reactors/ClientBidiReactorBase.h
@@ -3,6 +3,7 @@
#include "BaseReactor.h"
#include <grpcpp/grpcpp.h>
+#include <glog/logging.h>
namespace comm {
namespace network {
@@ -108,8 +109,7 @@
this->statusHolder->setStatus(status);
}
if (!this->statusHolder->getStatus().ok()) {
- std::cout << "error: " << this->statusHolder->getStatus().error_message()
- << std::endl;
+ LOG(ERROR) << this->statusHolder->getStatus().error_message();
}
if (this->statusHolder->state != ReactorState::RUNNING) {
return;
diff --git a/services/lib/src/client-base-reactors/ClientReadReactorBase.h b/services/lib/src/client-base-reactors/ClientReadReactorBase.h
--- a/services/lib/src/client-base-reactors/ClientReadReactorBase.h
+++ b/services/lib/src/client-base-reactors/ClientReadReactorBase.h
@@ -3,6 +3,7 @@
#include "BaseReactor.h"
#include <grpcpp/grpcpp.h>
+#include <glog/logging.h>
namespace comm {
namespace network {
@@ -86,8 +87,7 @@
this->statusHolder->setStatus(status);
}
if (!this->statusHolder->getStatus().ok()) {
- std::cout << "error: " << this->statusHolder->getStatus().error_message()
- << std::endl;
+ LOG(ERROR) << this->statusHolder->getStatus().error_message();
}
if (this->statusHolder->state != ReactorState::RUNNING) {
return;
diff --git a/services/lib/src/client-base-reactors/ClientWriteReactorBase.h b/services/lib/src/client-base-reactors/ClientWriteReactorBase.h
--- a/services/lib/src/client-base-reactors/ClientWriteReactorBase.h
+++ b/services/lib/src/client-base-reactors/ClientWriteReactorBase.h
@@ -3,6 +3,7 @@
#include "BaseReactor.h"
#include <grpcpp/grpcpp.h>
+#include <glog/logging.h>
namespace comm {
namespace network {
@@ -93,8 +94,7 @@
this->statusHolder->setStatus(status);
}
if (!this->statusHolder->getStatus().ok()) {
- std::cout << "error: " << this->statusHolder->getStatus().error_message()
- << std::endl;
+ LOG(ERROR) << this->statusHolder->getStatus().error_message();
}
if (this->statusHolder->state != ReactorState::RUNNING) {
return;
diff --git a/services/lib/src/server-base-reactors/ServerReadReactorBase.h b/services/lib/src/server-base-reactors/ServerReadReactorBase.h
--- a/services/lib/src/server-base-reactors/ServerReadReactorBase.h
+++ b/services/lib/src/server-base-reactors/ServerReadReactorBase.h
@@ -3,6 +3,7 @@
#include "BaseReactor.h"
#include <grpcpp/grpcpp.h>
+#include <glog/logging.h>
#include <atomic>
#include <iostream>
@@ -91,8 +92,7 @@
grpc::Status(grpc::StatusCode::INTERNAL, e.what()));
}
if (!this->statusHolder->getStatus().ok()) {
- std::cout << "error: " << this->statusHolder->getStatus().error_message()
- << std::endl;
+ LOG(ERROR) << this->statusHolder->getStatus().error_message();
}
if (this->statusHolder->state != ReactorState::RUNNING) {
return;
diff --git a/services/lib/src/server-base-reactors/ServerWriteReactorBase.h b/services/lib/src/server-base-reactors/ServerWriteReactorBase.h
--- a/services/lib/src/server-base-reactors/ServerWriteReactorBase.h
+++ b/services/lib/src/server-base-reactors/ServerWriteReactorBase.h
@@ -3,6 +3,7 @@
#include "BaseReactor.h"
#include <grpcpp/grpcpp.h>
+#include <glog/logging.h>
#include <atomic>
#include <iostream>
@@ -69,8 +70,7 @@
grpc::Status(grpc::StatusCode::INTERNAL, e.what()));
}
if (!this->statusHolder->getStatus().ok()) {
- std::cout << "error: " << this->statusHolder->getStatus().error_message()
- << std::endl;
+ LOG(ERROR) << this->statusHolder->getStatus().error_message();
}
if (this->statusHolder->state != ReactorState::RUNNING) {
return;
@@ -105,7 +105,7 @@
}
this->StartWrite(&this->response);
} catch (std::runtime_error &e) {
- std::cout << "error: " << e.what() << std::endl;
+ LOG(ERROR) << "error: " << e.what();
this->terminate(grpc::Status(grpc::StatusCode::INTERNAL, e.what()));
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 1:39 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536162
Default Alt Text
D4591.id14762.diff (4 KB)
Attached To
Mode
D4591: [services] Lib - Remove couts or replace them with glog
Attached
Detach File
Event Timeline
Log In to Comment