fix: crash when trace-logging in tests (#5529)

This PR fixes a crash in tests when the test `Env is run at trace/debug log level.

This issue only affects tests, and only if logging at trace/debug level, so really only relevant during rippled development, and does not affect production servers.
This commit is contained in:
Mayukha Vadari
2025-07-03 00:40:25 +05:30
committed by GitHub
parent e18f27f5f7
commit c2f3e2e263

View File

@@ -94,6 +94,8 @@ SuiteJournalSink::writeAlways(
return "FTL:";
}();
static std::mutex log_mutex;
std::lock_guard lock(log_mutex);
suite_.log << s << partition_ << text << std::endl;
}