Log: Fix file log timestamps always enabled

This commit is contained in:
Stenzek 2025-07-01 17:57:38 +10:00
parent 36518a8df5
commit f123677df4
No known key found for this signature in database

View File

@ -491,10 +491,11 @@ void Log::FileOutputLogCallback(void* pUserParam, MessageCategory cat, const cha
if (!s_state.file_output_enabled)
return;
FormatLogMessageAndPrint(cat, functionName, message, true, false, [](std::string_view message) {
std::fwrite(message.data(), 1, message.size(), s_state.file_handle.get());
std::fflush(s_state.file_handle.get());
});
FormatLogMessageAndPrint(cat, functionName, message, s_state.file_output_timestamp, false,
[](std::string_view message) {
std::fwrite(message.data(), 1, message.size(), s_state.file_handle.get());
std::fflush(s_state.file_handle.get());
});
}
void Log::SetFileOutputParams(bool enabled, const char* filename, bool timestamps /* = true */)