Skip to content
Snippets Groups Projects
Commit dd066171 authored by Millian Poquet's avatar Millian Poquet
Browse files

[code] loguru: network

parent bca7a14b
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,8 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <loguru.hpp>
#include "pempek_assert.hpp"
using namespace std;
......@@ -33,7 +35,7 @@ void Network::write(const string &content)
// Let's make sure the sent message is in UTF-8
string msg_utf8 = boost::locale::conv::to_utf<char>(content, "UTF-8");
printf("Sending '%s'\n", msg_utf8.c_str());
LOG_F(INFO, "Sending '%s'", msg_utf8.c_str());
fflush(stdout);
_socket->send(msg_utf8.data(), msg_utf8.size());
}
......@@ -49,6 +51,6 @@ void Network::read(string &received_content)
string received_utf8 = boost::locale::conv::from_utf(received_content, "UTF-8");
received_content = received_utf8;
printf("Received '%s'\n", received_content.c_str());
LOG_F(INFO, "Received '%s'", received_content.c_str());
fflush(stdout);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment