aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/http/client_connection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/http/client_connection.cc')
-rw-r--r--libtransport/src/http/client_connection.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/libtransport/src/http/client_connection.cc b/libtransport/src/http/client_connection.cc
index a24a821e7..b4ab7cbc3 100644
--- a/libtransport/src/http/client_connection.cc
+++ b/libtransport/src/http/client_connection.cc
@@ -13,14 +13,12 @@
* limitations under the License.
*/
+#include <glog/logging.h>
+#include <hicn/transport/core/asio_wrapper.h>
#include <hicn/transport/core/content_object.h>
#include <hicn/transport/core/interest.h>
#include <hicn/transport/http/client_connection.h>
#include <hicn/transport/utils/hash.h>
-#include <hicn/transport/utils/log.h>
-
-#include <asio.hpp>
-#include <asio/steady_timer.hpp>
#define DEFAULT_BETA 0.99
#define DEFAULT_GAMMA 0.07
@@ -77,13 +75,12 @@ class HTTPClientConnection::Implementation
success_callback_ = [this, method = std::move(method), url = std::move(url),
start = std::move(start)](std::size_t size) -> void {
auto end = std::chrono::steady_clock::now();
- TRANSPORT_LOGI(
- "%s %s [%s] duration: %llu [usec] %zu [bytes]\n",
- method_map[method].c_str(), url.c_str(), name_.str().c_str(),
- (unsigned long long)
- std::chrono::duration_cast<std::chrono::microseconds>(end - start)
- .count(),
- size);
+ LOG(INFO) << method_map[method].c_str() << " " << url.c_str() << " ["
+ << name_.str() << "] duration: "
+ << std::chrono::duration_cast<std::chrono::microseconds>(end -
+ start)
+ .count()
+ << " [usec] " << size << " [bytes]";
};
sendRequestGetReply(ipv6_first_word);
@@ -203,8 +200,8 @@ class HTTPClientConnection::Implementation
}
void readError(const std::error_code ec) noexcept override {
- TRANSPORT_LOGE("Error %s during download of %s", ec.message().c_str(),
- current_url_.c_str());
+ LOG(ERROR) << "Error " << ec.message() << " during download of "
+ << current_url_.c_str();
if (read_bytes_callback_) {
read_bytes_callback_->onError(ec);
}