22 #ifndef LOG_CLIENT_FORMATTER_H 23 #define LOG_CLIENT_FORMATTER_H 25 #include <boost/date_time/posix_time/posix_time_types.hpp> 31 auto l_Now(boost::posix_time::microsec_clock::universal_time());
32 auto l_Date(l_Now.date());
33 auto l_DayTime (l_Now.time_of_day());
34 std::cout << std::dec << l_Date.day() <<
"-" 35 << std::setw(2) << std::setfill(
'0') << (int)l_Date.month() <<
"-" 36 << std::setw(4) << std::setfill(
'0') << l_Date.year() <<
";" 37 << std::setw(2) << std::setfill(
'0') << l_DayTime.hours() <<
":" 38 << std::setw(2) << std::setfill(
'0') << l_DayTime.minutes() <<
":" 39 << std::setw(2) << std::setfill(
'0') << l_DayTime.seconds() <<
"." 40 << std::setw(3) << std::setfill(
'0') << (l_DayTime.total_milliseconds() % 1000) <<
";";
43 for (
auto it = a_Buffer.begin(); it != a_Buffer.end(); ++it) {
44 std::cout << std::hex << std::setw(2) << std::setfill(
'0') << std::uppercase << int(*it) <<
" ";
47 std::cout << std::endl;
50 #endif // LOG_CLIENT_FORMATTER_H