Skip to content

Commit c2f3e2e

Browse files
authored
fix: crash when trace-logging in tests (XRPLF#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.
1 parent e18f27f commit c2f3e2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/unit_test/SuiteJournal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ SuiteJournalSink::writeAlways(
9494
return "FTL:";
9595
}();
9696

97+
static std::mutex log_mutex;
98+
std::lock_guard lock(log_mutex);
9799
suite_.log << s << partition_ << text << std::endl;
98100
}
99101

0 commit comments

Comments
 (0)