aboutsummaryrefslogtreecommitdiffstats
path: root/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2022-09-19 08:37:30 +0000
committerEnrico Loparco <eloparco@cisco.com>2022-09-21 08:11:14 +0000
commit582e9a1b4275d89b02d020e1155ee8a0aff65d3b (patch)
tree78c3a86e4359f888ffa1450ffd753815fc5e9d20 /apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h
parent10e0758a2124e8d9d6253a9160e593303b38f71e (diff)
refactor(logs): use glog instead of prints
Ref: HICN-788 Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: Iedf75e1658a335985cc2dfd7b82ae61124f2371e
Diffstat (limited to 'apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h')
-rw-r--r--apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h15
1 files changed, 6 insertions, 9 deletions
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 935b85e78..14e0068ed 100644
--- a/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h
+++ b/apps/http-proxy/includes/hicn/http-proxy/forwarder_config.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Cisco and/or its affiliates.
+ * Copyright (c) 2021-2022 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -15,9 +15,9 @@
#pragma once
+#include <hicn/apps/utils/logger.h>
#include <hicn/transport/portability/c_portability.h>
#include <hicn/transport/utils/branch_prediction.h>
-#include <hicn/transport/utils/log.h>
#include <hicn/transport/utils/string_utils.h>
#include <asio.hpp>
@@ -67,8 +67,7 @@ class ForwarderConfig {
if (ret < 0) {
// We were not able to connect to the local forwarder. Do not give up
// and retry.
- TRANSPORT_LOG_ERROR
- << "Could not connect to local forwarder. Retrying.";
+ LoggerErr() << "Could not connect to local forwarder. Retrying.";
timer_.expires_from_now(std::chrono::milliseconds(RETRY_INTERVAL));
timer_.async_wait(std::bind(&ForwarderConfig::doTryToConnectToForwarder,
@@ -79,8 +78,7 @@ class ForwarderConfig {
doGetMainListener(std::make_error_code(std::errc(0)));
}
} else {
- TRANSPORT_LOG_ERROR
- << "Timer for re-trying forwarder connection canceled.";
+ LoggerErr() << "Timer for re-trying forwarder connection canceled.";
}
}
@@ -91,7 +89,7 @@ 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_LOG_ERROR
+ LoggerErr()
<< "Could not retrieve main listener port from the forwarder. "
"Retrying.";
@@ -105,8 +103,7 @@ class ForwarderConfig {
listener_retrieved_callback_(std::make_error_code(std::errc(0)));
}
} else {
- TRANSPORT_LOG_ERROR
- << "Timer for retrieving main hicn listener canceled.";
+ LoggerErr() << "Timer for retrieving main hicn listener canceled.";
}
}