xrpld
Loading...
Searching...
No Matches
xrpl::test::SuiteJournalSink Class Reference

#include <SuiteJournal.h>

Inheritance diagram for xrpl::test::SuiteJournalSink:
Collaboration diagram for xrpl::test::SuiteJournalSink:

Public Member Functions

 SuiteJournalSink (std::string const &partition, beast::Severity threshold, beast::unit_test::Suite &suite)
bool active (beast::Severity level) const override
 Returns true if text at the passed severity produces output.
void write (beast::Severity level, std::string const &text) override
 Write text to the sink at the specified severity.
void writeAlways (beast::Severity level, std::string const &text) override
 Bypass filter and write text to the sink at the specified severity.
virtual bool console () const
 Returns true if a message is also written to the Output Window (MSVC).
virtual void console (bool output)
 Set whether messages are also written to the Output Window (MSVC).
virtual Severity threshold () const
 Returns the minimum severity level this sink will report.
virtual void threshold (Severity thresh)
 Set the minimum severity this sink will report.

Private Attributes

std::string partition_
beast::unit_test::Suitesuite_
Severity thresh_
bool console_

Detailed Description

Definition at line 9 of file SuiteJournal.h.

Constructor & Destructor Documentation

◆ SuiteJournalSink()

xrpl::test::SuiteJournalSink::SuiteJournalSink ( std::string const & partition,
beast::Severity threshold,
beast::unit_test::Suite & suite )

Definition at line 15 of file SuiteJournal.h.

Member Function Documentation

◆ active()

bool xrpl::test::SuiteJournalSink::active ( beast::Severity level) const
nodiscardoverridevirtual

Returns true if text at the passed severity produces output.

Reimplemented from beast::Journal::Sink.

Definition at line 25 of file SuiteJournal.h.

◆ write()

void xrpl::test::SuiteJournalSink::write ( beast::Severity level,
std::string const & text )
overridevirtual

Write text to the sink at the specified severity.

A conforming implementation will not write the text if the passed level is below the current threshold().

Implements beast::Journal::Sink.

Definition at line 38 of file SuiteJournal.h.

◆ writeAlways()

void xrpl::test::SuiteJournalSink::writeAlways ( beast::Severity level,
std::string const & text )
overridevirtual

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.

Parameters
levelLevel to display in message.
textText to write to sink.

Implements beast::Journal::Sink.

Definition at line 46 of file SuiteJournal.h.

◆ console() [1/2]

bool beast::Journal::Sink::console ( ) const
nodiscardvirtualinherited

Returns true if a message is also written to the Output Window (MSVC).

Reimplemented in beast::NullJournalSink, and beast::WrappedSink.

Definition at line 84 of file beast_Journal.cpp.

◆ console() [2/2]

void beast::Journal::Sink::console ( bool output)
virtualinherited

Set whether messages are also written to the Output Window (MSVC).

Reimplemented in beast::NullJournalSink, and beast::WrappedSink.

Definition at line 90 of file beast_Journal.cpp.

◆ threshold() [1/2]

Severity beast::Journal::Sink::threshold ( ) const
nodiscardvirtualinherited

Returns the minimum severity level this sink will report.

Reimplemented in beast::NullJournalSink, and beast::WrappedSink.

Definition at line 96 of file beast_Journal.cpp.

◆ threshold() [2/2]

void beast::Journal::Sink::threshold ( Severity thresh)
virtualinherited

Set the minimum severity this sink will report.

Reimplemented in beast::NullJournalSink, and beast::WrappedSink.

Definition at line 102 of file beast_Journal.cpp.

Member Data Documentation

◆ partition_

std::string xrpl::test::SuiteJournalSink::partition_
private

Definition at line 11 of file SuiteJournal.h.

◆ suite_

beast::unit_test::Suite& xrpl::test::SuiteJournalSink::suite_
private

Definition at line 12 of file SuiteJournal.h.

◆ thresh_

Severity beast::Journal::Sink::thresh_
privateinherited

Definition at line 103 of file Journal.h.

◆ console_

bool beast::Journal::Sink::console_
privateinherited

Definition at line 104 of file Journal.h.