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

@@ -67,6 +67,10 @@ private:
void
write(beast::severities::Severity level, std::string const& text)
override;
void
writeAlways(beast::severities::Severity level, std::string const& text)
override;
};
/** Manages a system file containing logged output.
@@ -256,6 +260,14 @@ private:
x
#endif
#ifndef CLOG
#define CLOG(ss) \
if (!ss) \
; \
else \
*ss
#endif
//------------------------------------------------------------------------------
// Debug logging: