16namespace Systemic::Internal
28 static void log(
const std::string& message)
30 static std::ofstream myfile(std::filesystem::temp_directory_path().append(
"systemic_log.txt").native());
32 std::ostringstream ss;
33 time_in_HH_MM_SS_MMM(ss);
34 ss <<
"[" << std::this_thread::get_id() <<
"]" <<
": " << message <<
"\n";
40 static void time_in_HH_MM_SS_MMM(std::ostream& out)
42 using namespace std::chrono;
45 auto now = system_clock::now();
49 auto ms = duration_cast<milliseconds>(now.time_since_epoch()) % 1000;
52 auto timer = system_clock::to_time_t(now);
56 ::localtime_s(&bt, &timer);
59 std::ios init(
nullptr);
62 out << std::put_time(&bt,
"%H:%M:%S");
63 out <<
'.' << std::setfill(
'0') << std::setw(3) << ms.count() << std::setw(3);