mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-24 12:35:50 +00:00
Implement a debug Journal
This commit is contained in:
@@ -329,4 +329,22 @@ Logs::format (std::string& output, std::string const& message,
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
static std::unique_ptr<beast::Journal> debugJournal_;
|
||||
|
||||
beast::Journal const&
|
||||
debugJournal()
|
||||
{
|
||||
if (!debugJournal_)
|
||||
debugJournal_ = std::make_unique<beast::Journal>();
|
||||
|
||||
return *debugJournal_;
|
||||
}
|
||||
|
||||
void
|
||||
setDebugJournalSink(beast::Journal::Sink& sink)
|
||||
{
|
||||
debugJournal_ = std::make_unique<beast::Journal>(sink);
|
||||
}
|
||||
|
||||
} // ripple
|
||||
|
||||
Reference in New Issue
Block a user