Skip to content

Commit 027b236

Browse files
committed
Log everything in one message. Split log messages suck.
1 parent f688d50 commit 027b236

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

src/xrpld/overlay/detail/PeerImp.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,22 +2065,23 @@ PeerImp::onValidatorListMessage(
20652065
return;
20662066
}
20672067

2068+
if (auto const sink = p_journal_.debug())
20682069
{
2069-
JLOG(p_journal_.debug()) << "Manifest: " << base64_decode(manifest);
2070-
JLOG(p_journal_.debug()) << "Version: " << version;
2071-
JLOG(p_journal_.debug()) << "Hash: " << hash;
2070+
std::stringstream str;
2071+
str << "Manifest: " << base64_decode(manifest);
2072+
str << " Version: " << version;
2073+
str << " Hash: " << hash;
20722074
std::size_t count = 1;
20732075
for (auto const& blob : blobs)
20742076
{
2075-
JLOG(p_journal_.debug())
2076-
<< "Blob " << count << " Signature: " << blob.signature;
2077-
JLOG(p_journal_.debug())
2078-
<< "Blob " << count << " blob: " << base64_decode(blob.blob);
2079-
JLOG(p_journal_.debug())
2080-
<< "Blob " << count << " manifest: "
2077+
str << " Blob " << count << ":";
2078+
str << " Signature: " << blob.signature;
2079+
str << " blob: " << base64_decode(blob.blob);
2080+
str << " manifest: "
20812081
<< (blob.manifest ? base64_decode(*blob.manifest) : "NONE");
20822082
++count;
20832083
}
2084+
sink << str.str();
20842085
}
20852086

20862087
auto const applyResult = app_.validators().applyListsAndBroadcast(

0 commit comments

Comments
 (0)