sys: Disable buffering on log files

This commit is contained in:
WerWolv
2022-03-01 00:03:28 +01:00
parent 5a02c38fcd
commit b57730c28b
3 changed files with 14 additions and 5 deletions

View File

@@ -26,6 +26,7 @@ namespace hex::log {
for (const auto &path : hex::getPath(ImHexPath::Logs, true)) {
fs::create_directories(path);
g_loggerFile = File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::now())), File::Mode::Create);
g_loggerFile.disableBuffering();
if (g_loggerFile.isValid()) break;
}