aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/io_modules/udp/udp_socket_connector.cc
diff options
context:
space:
mode:
authorMauro <you@example.com>2021-06-30 07:57:22 +0000
committerMauro Sardara <msardara@cisco.com>2021-07-06 16:16:04 +0000
commit08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch)
tree7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /libtransport/src/io_modules/udp/udp_socket_connector.cc
parent147ba39bed26887f5eba84757e2463ab8e370a9a (diff)
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'libtransport/src/io_modules/udp/udp_socket_connector.cc')
-rw-r--r--libtransport/src/io_modules/udp/udp_socket_connector.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libtransport/src/io_modules/udp/udp_socket_connector.cc b/libtransport/src/io_modules/udp/udp_socket_connector.cc
index 456886a54..1412d8c07 100644
--- a/libtransport/src/io_modules/udp/udp_socket_connector.cc
+++ b/libtransport/src/io_modules/udp/udp_socket_connector.cc
@@ -17,8 +17,8 @@
#include <hicn/transport/portability/win_portability.h>
#endif
+#include <glog/logging.h>
#include <hicn/transport/errors/errors.h>
-#include <hicn/transport/utils/log.h>
#include <hicn/transport/utils/object_pool.h>
#include <io_modules/udp/udp_socket_connector.h>
@@ -117,7 +117,7 @@ void UdpSocketConnector::doWrite() {
// The connection has been closed by the application.
return;
} else {
- TRANSPORT_LOGE("%d %s", ec.value(), ec.message().c_str());
+ LOG(ERROR) << ec.value() << " " << ec.message();
tryReconnect();
}
});
@@ -137,7 +137,7 @@ void UdpSocketConnector::doRead() {
// The connection has been closed by the application.
return;
} else {
- TRANSPORT_LOGE("%d %s", ec.value(), ec.message().c_str());
+ LOG(ERROR) << ec.value() << " " << ec.message();
tryReconnect();
}
});
@@ -145,7 +145,7 @@ void UdpSocketConnector::doRead() {
void UdpSocketConnector::tryReconnect() {
if (state_ == Connector::State::CONNECTED) {
- TRANSPORT_LOGE("Connection lost. Trying to reconnect...\n");
+ LOG(ERROR) << "Connection lost. Trying to reconnect...";
state_ = Connector::State::CONNECTING;
is_reconnection_ = true;
io_service_.post([this]() {
@@ -201,7 +201,7 @@ void UdpSocketConnector::handleDeadline(const std::error_code &ec) {
if (!ec) {
io_service_.post([this]() {
socket_.close();
- TRANSPORT_LOGE("Error connecting. Is the forwarder running?\n");
+ LOG(ERROR) << "Error connecting. Is the forwarder running?";
});
}
}