Access Journal::Stream using member functions (RIPD-1087):

Replace Journal public data members with member function accessors
in order to make Journal lighter weight.  The change makes a
Journal cheaper to pass by value.

Also add missing stream checks (e.g., calls to JLOG) to avoid
text processing that ultimately will not be stored in the log.
This commit is contained in:
Scott Schurr
2016-03-09 10:48:21 -08:00
committed by seelabs
parent b3f5986c83
commit 7a4bd2278d
132 changed files with 1843 additions and 1799 deletions

View File

@@ -182,7 +182,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
{
if (rawNode.size () < 4)
{
JLOG (j.info) << "size < 4";
JLOG (j.info()) << "size < 4";
Throw<std::runtime_error> ("invalid P node");
}
@@ -215,7 +215,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
if (u.isZero ())
{
JLOG (j.info) << "invalid PLN node";
JLOG (j.info()) << "invalid PLN node";
Throw<std::runtime_error> ("invalid PLN node");
}
@@ -258,7 +258,7 @@ SHAMapAbstractNode::make(Blob const& rawNode, std::uint32_t seq, SHANodeFormat f
}
else
{
JLOG (j.info) << "Unknown node prefix " << std::hex << prefix << std::dec;
JLOG (j.info()) << "Unknown node prefix " << std::hex << prefix << std::dec;
Throw<std::runtime_error> ("invalid node prefix");
}
}
@@ -466,7 +466,7 @@ int SHAMapInnerNode::getBranchCount () const
void
SHAMapAbstractNode::dump(const SHAMapNodeID & id, beast::Journal journal)
{
if (journal.debug) journal.debug <<
JLOG(journal.debug()) <<
"SHAMapTreeNode(" << id.getNodeID () << ")";
}