Log: Flush on every write

Slower, but if we crash, need the whole thing.
This commit is contained in:
Stenzek 2024-08-18 12:18:08 +10:00
parent ce7bbb47d5
commit 44a12db931
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -413,6 +413,7 @@ void Log::FileOutputLogCallback(void* pUserParam, const char* channelName, const
FormatLogMessageAndPrint(channelName, functionName, level, message, true, false, true, [](std::string_view message) {
std::fwrite(message.data(), 1, message.size(), s_file_handle.get());
std::fflush(s_file_handle.get());
});
}