aboutsummaryrefslogtreecommitdiffstats
path: root/apps/http-proxy/src/http_session.cc
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/src/http_session.cc
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/src/http_session.cc')
-rw-r--r--apps/http-proxy/src/http_session.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/http-proxy/src/http_session.cc b/apps/http-proxy/src/http_session.cc
index 870f188cd..def4c61cf 100644
--- a/apps/http-proxy/src/http_session.cc
+++ b/apps/http-proxy/src/http_session.cc
@@ -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:
@@ -13,9 +13,9 @@
* limitations under the License.
*/
+#include <hicn/apps/utils/logger.h>
#include <hicn/http-proxy/http_proxy.h>
#include <hicn/transport/utils/branch_prediction.h>
-#include <hicn/transport/utils/log.h>
#include <iostream>
@@ -269,7 +269,7 @@ void HTTPSession::doReadHeader() {
void HTTPSession::tryReconnection() {
if (on_connection_closed_callback_(socket_)) {
if (state_ == ConnectorState::CONNECTED) {
- TRANSPORT_LOG_ERROR << "Connection lost. Trying to reconnect...";
+ LoggerErr() << "Connection lost. Trying to reconnect...";
state_ = ConnectorState::CONNECTING;
is_reconnection_ = true;
io_service_.post([this]() {
@@ -306,11 +306,11 @@ void HTTPSession::doConnect() {
if (is_reconnection_) {
is_reconnection_ = false;
- TRANSPORT_LOG_INFO << "Connection recovered!";
+ LoggerInfo() << "Connection recovered!";
}
} else {
- TRANSPORT_LOG_ERROR << "Impossible to reconnect: " << ec.message();
+ LoggerErr() << "Impossible to reconnect: " << ec.message();
close();
}
});
@@ -330,7 +330,7 @@ void HTTPSession::handleDeadline(const std::error_code &ec) {
if (!ec) {
io_service_.post([this]() {
socket_.close();
- TRANSPORT_LOG_ERROR << "Error connecting. Is the server running?";
+ LoggerErr() << "Error connecting. Is the server running?";
io_service_.stop();
});
}