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 --- .../includes/hicn/http-proxy/forwarder_config.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h') diff --git a/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h b/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h index 19c96a9e3..e02b9d9a7 100644 --- a/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h +++ b/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h @@ -27,7 +27,6 @@ #include "forwarder_interface.h" - #define RETRY_INTERVAL 300 namespace transport { @@ -68,7 +67,8 @@ class ForwarderConfig { if (ret < 0) { // We were not able to connect to the local forwarder. Do not give up // and retry. - TRANSPORT_LOGE("Could not connect to local forwarder. Retrying."); + TRANSPORT_LOG_ERROR + << "Could not connect to local forwarder. Retrying."; timer_.expires_from_now(std::chrono::milliseconds(RETRY_INTERVAL)); timer_.async_wait(std::bind(&ForwarderConfig::doTryToConnectToForwarder, @@ -79,7 +79,8 @@ class ForwarderConfig { doGetMainListener(std::make_error_code(std::errc(0))); } } else { - TRANSPORT_LOGD("Timer for re-trying forwarder connection canceled."); + TRANSPORT_LOG_ERROR + << "Timer for re-trying forwarder connection canceled."; } } @@ -90,9 +91,9 @@ class ForwarderConfig { if (ret <= 0) { // Since without the main listener of the forwarder the proxy cannot // work, we can stop the program here until we get the listener port. - TRANSPORT_LOGE( - "Could not retrieve main listener port from the forwarder. " - "Retrying."); + TRANSPORT_LOG_ERROR + << "Could not retrieve main listener port from the forwarder. " + "Retrying."; timer_.expires_from_now(std::chrono::milliseconds(RETRY_INTERVAL)); timer_.async_wait(std::bind(&ForwarderConfig::doGetMainListener, this, @@ -104,7 +105,8 @@ class ForwarderConfig { listener_retrieved_callback_(std::make_error_code(std::errc(0))); } } else { - TRANSPORT_LOGI("Timer for retrieving main hicn listener canceled."); + TRANSPORT_LOG_ERROR + << "Timer for retrieving main hicn listener canceled."; } } -- cgit 1.2.3-korg