Skip to content
Snippets Groups Projects
Commit 9e616642 authored by Hoop77's avatar Hoop77
Browse files

-

parent d12f691f
Branches
No related merge requests found
......@@ -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); });
});
......
#include "PC2CarLib/CommandSender.h"
#include "NetworkingLib/ServiceClient.h"
#include "../include/Logger.h"
int main()
......
......@@ -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));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment