16namespace Systemic::Internal
24 static void Log(
const std::string& str)
26 static std::ofstream myfile(std::filesystem::temp_directory_path().append(
"systemic_log.txt").native());
28 std::ostringstream ss;
29 time_in_HH_MM_SS_MMM(ss);
30 ss <<
"[" << std::this_thread::get_id() <<
"]" <<
": " << str <<
"\n";
36 static void time_in_HH_MM_SS_MMM(std::ostream& out)
38 using namespace std::chrono;
41 auto now = system_clock::now();
45 auto ms = duration_cast<milliseconds>(now.time_since_epoch()) % 1000;
48 auto timer = system_clock::to_time_t(now);
52 ::localtime_s(&bt, &timer);
55 std::ios init(
nullptr);
58 out << std::put_time(&bt,
"%H:%M:%S");
59 out <<
'.' << std::setfill(
'0') << std::setw(3) << ms.count() << std::setw(3);