Log detailed correlated consensus data together (#5302)

Combine multiple related debug log data points into a single
message. Allows quick correlation of events that
previously were either not logged or, if logged, strewn
across multiple lines, making correlation difficult.
The Heartbeat Timer and consensus ledger accept processing
each have this capability.

Also guarantees that log entries will be written if the
node is a validator, regardless of log severity level.
Otherwise, the level of these messages is at INFO severity.
This commit is contained in:
Mark Travis
2025-02-27 10:02:57 -08:00
committed by GitHub
parent 0a1ca0600f
commit af018c7b0b
20 changed files with 546 additions and 134 deletions

View File

@@ -860,7 +860,7 @@ class ServerStatus_test : public beast::unit_test::suite,
// mark the Network as having an Amendment Warning, but won't fail
env.app().getOPs().setAmendmentWarned();
env.app().getOPs().beginConsensus(env.closed()->info().hash);
env.app().getOPs().beginConsensus(env.closed()->info().hash, {});
// consensus doesn't change
BEAST_EXPECT(
@@ -991,7 +991,7 @@ class ServerStatus_test : public beast::unit_test::suite,
// mark the Network as Amendment Blocked, but still won't fail until
// ELB is enabled (next step)
env.app().getOPs().setAmendmentBlocked();
env.app().getOPs().beginConsensus(env.closed()->info().hash);
env.app().getOPs().beginConsensus(env.closed()->info().hash, {});
// consensus now sees validation disabled
BEAST_EXPECT(

View File

@@ -96,6 +96,13 @@ public:
suite_.log << text << std::endl;
}
void
writeAlways(beast::severities::Severity level, std::string const& text)
override
{
suite_.log << text << std::endl;
}
};
//--------------------------------------------------------------------------