mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -112,6 +112,16 @@ public:
|
||||
virtual void
|
||||
write(Severity level, std::string const& text) = 0;
|
||||
|
||||
/** Bypass filter and write text to the sink at the specified severity.
|
||||
* Always write the message, but maintain the same formatting as if
|
||||
* it passed through a level filter.
|
||||
*
|
||||
* @param level Level to display in message.
|
||||
* @param text Text to write to sink.
|
||||
*/
|
||||
virtual void
|
||||
writeAlways(Severity level, std::string const& text) = 0;
|
||||
|
||||
private:
|
||||
Severity thresh_;
|
||||
bool m_console;
|
||||
|
||||
@@ -93,6 +93,13 @@ public:
|
||||
using beast::Journal;
|
||||
sink_.write(level, prefix_ + text);
|
||||
}
|
||||
|
||||
void
|
||||
writeAlways(severities::Severity level, std::string const& text) override
|
||||
{
|
||||
using beast::Journal;
|
||||
sink_.writeAlways(level, prefix_ + text);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace beast
|
||||
|
||||
Reference in New Issue
Block a user