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 +#include 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 +#include 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 +#include 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 +#include #include #include @@ -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 +#include #include #include @@ -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())); } }