diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-08-14 21:58:29 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-08-14 21:58:29 +0200 |
commit | 5cdb425d6843c100189611c2edb37b03efc1dc5a (patch) | |
tree | 82c5e7397b2950c41c00d09ed8020e9d98ced693 /src/main_server.cpp | |
parent | ad4fef28ad3fc8b73a3bf97c229e878e8c680e16 (diff) | |
download | ods-5cdb425d6843c100189611c2edb37b03efc1dc5a.tar.gz ods-5cdb425d6843c100189611c2edb37b03efc1dc5a.tar.bz2 ods-5cdb425d6843c100189611c2edb37b03efc1dc5a.tar.xz ods-5cdb425d6843c100189611c2edb37b03efc1dc5a.zip |
Make it compatible with CentOS 7.5
Diffstat (limited to 'src/main_server.cpp')
-rw-r--r-- | src/main_server.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/main_server.cpp b/src/main_server.cpp index b2f9425..7c6cee4 100644 --- a/src/main_server.cpp +++ b/src/main_server.cpp @@ -1,25 +1,10 @@ #include "UDPServer/UDPServer.h" #include "ReceiverThreads/ReceiverThreads.h" -#include <boost/log/core.hpp> -#include <boost/log/trivial.hpp> -#include <boost/log/expressions.hpp> - #include <iostream> #include <string> #include <thread> -void initLog() { -/* -#ifndef NDEBUG - boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::debug); -#else - boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::info); -#endif -*/ - boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::info); -} - void start(std::function<void(void)> func){ std::thread([func]() { while (true) @@ -31,10 +16,8 @@ void start(std::function<void(void)> func){ int main (int argc, char *argv[]){ - initLog(); - if(argc < 4){ - BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorServer <address> <first_port> <num_ports>"; + std::cerr << "Program usage: ./onlineDetectorSimulatorServer <address> <first_port> <num_ports>"; return 0; } @@ -66,12 +49,8 @@ int main (int argc, char *argv[]){ // std::size_t index = *((std::size_t *)buf.data()); // if(index%1000 == 99) printf("%lu\n", index); // -// if(lastIndex != (index-1)) -// BOOST_LOG_TRIVIAL(warning) << "Packet loss or wrong order!"; -// // lastIndex = index; // -// BOOST_LOG_TRIVIAL(debug) << "Server: Received " << bytes << " Bytes with Index " << index; // } return 0; |