40 #ifdef LOGGER_MULTITHREAD
84 std::ostringstream oss;
85 auto now = std::chrono::system_clock::now();
86 std::time_t currTime = std::chrono::system_clock::to_time_t(now);
87 struct tm *currTm = std::localtime(&currTime);
88 oss << outputFile <<
"_" <<
89 (1900 + currTm->tm_year) <<
"-" <<
90 currTm->tm_mon <<
"-" <<
91 currTm->tm_mday <<
"_" <<
92 currTm->tm_hour <<
"-" <<
93 currTm->tm_min <<
"-" <<
94 currTm->tm_sec <<
".log";
150 const std::string& message)
152 std::chrono::time_point<std::chrono::system_clock> currentTime =
153 std::chrono::system_clock::now();
155 int elapsed_seconds = std::chrono::duration_cast<std::chrono::seconds>
161 out_ <<
"[ " << elapsed_seconds <<
" ] " << message <<
162 "\t[ " << file <<
":" << line <<
"]" << std::endl;
165 std::cerr <<
"[ " << elapsed_seconds <<
" ] " << message <<
166 "\t[ " << file <<
":" << line <<
"]" << std::endl;