Implement a debug Journal

This commit is contained in:
Nik Bougalis
2016-01-27 11:22:54 -08:00
parent 57d6ab091c
commit 5ac744ff66
28 changed files with 243 additions and 338 deletions

View File

@@ -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