diff options
author | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2022-09-19 08:37:30 +0000 |
---|---|---|
committer | Enrico Loparco <eloparco@cisco.com> | 2022-09-21 08:11:14 +0000 |
commit | 582e9a1b4275d89b02d020e1155ee8a0aff65d3b (patch) | |
tree | 78c3a86e4359f888ffa1450ffd753815fc5e9d20 /apps/hiperf/src/server.cc | |
parent | 10e0758a2124e8d9d6253a9160e593303b38f71e (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/hiperf/src/server.cc')
-rw-r--r-- | apps/hiperf/src/server.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/hiperf/src/server.cc b/apps/hiperf/src/server.cc index afaf5423b..ee236f358 100644 --- a/apps/hiperf/src/server.cc +++ b/apps/hiperf/src/server.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: @@ -297,10 +297,10 @@ class HIperfServer::Impl { !configuration_.multiphase_produce_, suffix); utils::SteadyTime::TimePoint t1 = utils::SteadyTime::Clock::now(); - Logger() << "Written " << total - << " data packets in output buffer (Segmentation time: " - << utils::SteadyTime::getDurationUs(t0, t1).count() << " us)" - << std::endl; + LoggerInfo() << "Written " << total + << " data packets in output buffer (Segmentation time: " + << utils::SteadyTime::getDurationUs(t0, t1).count() << " us)" + << std::endl; } /** @@ -313,8 +313,8 @@ class HIperfServer::Impl { configuration_.content_lifetime_); produceContent(p, interest.getName(), interest.getName().getSuffix()); - Logger() << "Received interest " << interest.getName().getSuffix() - << std::endl; + LoggerInfo() << "Received interest " << interest.getName().getSuffix() + << std::endl; } /** @@ -552,11 +552,11 @@ class HIperfServer::Impl { } if (rtc_running_) { - Logger() << "stop real time content production" << std::endl; + LoggerInfo() << "stop real time content production" << std::endl; rtc_running_ = false; rtc_timer_.cancel(); } else { - Logger() << "start real time content production" << std::endl; + LoggerInfo() << "start real time content production" << std::endl; rtc_running_ = true; rtc_timer_.expires_from_now( config_.production_rate_.getMicrosecondsForPacket( @@ -593,13 +593,13 @@ class HIperfServer::Impl { std::bind(&Impl::handleInput, this, std::placeholders::_1, std::placeholders::_2)); } else if (config_.trace_based_) { - Logger() << "trace-based mode enabled" << std::endl; + LoggerInfo() << "trace-based mode enabled" << std::endl; if (config_.trace_file_ == nullptr) { - Logger() << "cannot find the trace file" << std::endl; + LoggerErr() << "cannot find the trace file" << std::endl; return ERROR_SETUP; } if (parseTraceFile() < 0) { - Logger() << "cannot parse the trace file" << std::endl; + LoggerErr() << "cannot parse the trace file" << std::endl; return ERROR_SETUP; } rtc_running_ = true; |