summaryrefslogtreecommitdiff
path: root/server/src/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-04 08:49:06 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-04 08:49:06 +0300
commit40de4ad32bf8d6b285903628dfc1bcfd0c1a708b (patch)
treec9fd7cea9e54e9f7b57c32919747b93ecd41b8cf /server/src/utilities.cpp
parent6594e57c5084fb7199673e15cb39541e4750d0b1 (diff)
server:
bits of log client-qt: implemented basic message dispatcher ability to send message (all untested)
Diffstat (limited to 'server/src/utilities.cpp')
-rw-r--r--server/src/utilities.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/utilities.cpp b/server/src/utilities.cpp
index 5ea14c1..ab10e30 100644
--- a/server/src/utilities.cpp
+++ b/server/src/utilities.cpp
@@ -18,6 +18,8 @@
*/
+#include <boost/log/trivial.hpp>
+
#include "utilities.h"
#include "../../protocol/udm.pb.h"
@@ -33,7 +35,7 @@ std::string replace_home_var(const std::string &path)
std::shared_ptr<char*> pack_data(const std::string &buf, int *size_)
{
-// BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__;
+ BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__;
std::shared_ptr<char*> ptr = std::make_shared<char*>(new char[buf.length() + 4]);
int32_t size = buf.length();
*size_ = size + 4;
@@ -48,8 +50,8 @@ std::shared_ptr<char*> pack_data(const std::string &buf, int *size_)
std::shared_ptr<char*> pack_msg(server_msg *msg, int *size_)
{
-// BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__;
-// BOOST_LOG_TRIVIAL(trace)<<"packing message:\n"<<cmd.DebugString();
+ BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__;
+ BOOST_LOG_TRIVIAL(trace)<<"packing message:\n"<<msg->DebugString();
std::string msg_buf;
msg->SerializeToString(&msg_buf);
return pack_data(msg_buf, size_);