diff --git a/modules/catkin_ws/src/PC/src/Logger.cpp b/modules/catkin_ws/src/PC/src/Logger.cpp index e8cb7d910c3eff1ee53ff06763771372049d2dfb..51b53c845af8b631fad5c1c64a7c304c715f4829 100644 --- a/modules/catkin_ws/src/PC/src/Logger.cpp +++ b/modules/catkin_ws/src/PC/src/Logger.cpp @@ -36,7 +36,9 @@ void Logger::log(AsyncState::Ptr state) emptyRequest, host, PORT, 10s, [state](const auto & error, auto & responseMessage) { - std::cout << responseMessage; + if (!responseMessage.empty()) + std::cout << responseMessage << "\n"; + state->self->timer->startTimeout(1ms, [state] { state->self->log(state); }); }); diff --git a/modules/catkin_ws/src/PC/src/main.cpp b/modules/catkin_ws/src/PC/src/main.cpp index 4ca09fdcca6728bdacb319b50888527860e547c2..79ec8f95a31d229ca78800295cffae9f6ca5b151 100644 --- a/modules/catkin_ws/src/PC/src/main.cpp +++ b/modules/catkin_ws/src/PC/src/main.cpp @@ -1,5 +1,4 @@ #include "PC2CarLib/CommandSender.h" -#include "NetworkingLib/ServiceClient.h" #include "../include/Logger.h" int main() diff --git a/modules/catkin_ws/src/car/src/logging/Logging.cpp b/modules/catkin_ws/src/car/src/logging/Logging.cpp index 6806425119042c294b6f5cf4babf4a9f7a600a61..9c6c26a7af15377d2fe60dca459bd42fd624b9e7 100644 --- a/modules/catkin_ws/src/car/src/logging/Logging.cpp +++ b/modules/catkin_ws/src/car/src/logging/Logging.cpp @@ -49,9 +49,6 @@ void Logging::onInit() loggingServer->advertiseService( [this](const auto & clientEndpoint, auto & requestMessage, auto & responseMessage) { - std::cout << "\n----------------------------\n" - << "!!! CONNECTED !!!\n" - << "\n----------------------------\n\n"; std::lock_guard<std::mutex> lock{loggingMutex}; responseMessage = networking::utils::stringFromStreambuf( loggingBuffer, std::min(loggingBuffer.size(), MAX_MESSAGE_SIZE));