From 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 Mon Sep 17 00:00:00 2001 From: Mauro Date: Wed, 30 Jun 2021 07:57:22 +0000 Subject: [HICN-713] Transport Library Major Refactoring 2 Co-authored-by: Luca Muscariello Co-authored-by: Michele Papalini Co-authored-by: Olivier Roques Co-authored-by: Giulio Grassi Signed-off-by: Mauro Sardara Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2 --- libtransport/src/io_modules/udp/udp_socket_connector.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libtransport/src/io_modules/udp/udp_socket_connector.cc') 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 #endif +#include #include -#include #include #include @@ -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?"; }); } } -- cgit 1.2.3-korg