rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ripple::test::csf::BasicSink Class Reference

Sink that prepends simulation time to messages. More...

#include <Sim.h>

Inheritance diagram for ripple::test::csf::BasicSink:
Inheritance graph
[legend]
Collaboration diagram for ripple::test::csf::BasicSink:
Collaboration graph
[legend]

Public Member Functions

 BasicSink (Scheduler::clock_type const &clock)
 
void write (beast::severities::Severity level, std::string const &text) override
 Write text to the sink at the specified severity.
 
void writeAlways (beast::severities::Severity level, std::string const &text) override
 Bypass filter and write text to the sink at the specified severity.
 
virtual bool active (Severity level) const
 Returns true if text at the passed severity produces output.
 
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

Scheduler::clock_type const & clock_
 
Severity thresh_
 
bool m_console
 

Detailed Description

Sink that prepends simulation time to messages.

Definition at line 22 of file Sim.h.

Constructor & Destructor Documentation

◆ BasicSink()

ripple::test::csf::BasicSink::BasicSink ( Scheduler::clock_type const &  clock)

Definition at line 27 of file Sim.h.

Member Function Documentation

◆ write()

void ripple::test::csf::BasicSink::write ( beast::severities::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 33 of file Sim.h.

◆ writeAlways()

void ripple::test::csf::BasicSink::writeAlways ( beast::severities::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 43 of file Sim.h.

◆ active()

bool beast::Journal::Sink::active ( Severity  level) const
virtualinherited

Returns true if text at the passed severity produces output.

Reimplemented in beast::WrappedSink, ripple::test::SuiteJournalSink, and beast::NullJournalSink.

Definition at line 79 of file beast_Journal.cpp.

◆ console() [1/2]

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

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

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

Definition at line 85 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::WrappedSink, and beast::NullJournalSink.

Definition at line 91 of file beast_Journal.cpp.

◆ threshold() [1/2]

severities::Severity beast::Journal::Sink::threshold ( ) const
virtualinherited

Returns the minimum severity level this sink will report.

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

Definition at line 97 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::WrappedSink, and beast::NullJournalSink.

Definition at line 103 of file beast_Journal.cpp.

Member Data Documentation

◆ clock_

Scheduler::clock_type const& ripple::test::csf::BasicSink::clock_
private

Definition at line 24 of file Sim.h.

◆ thresh_

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

Definition at line 108 of file Journal.h.

◆ m_console

bool beast::Journal::Sink::m_console
privateinherited

Definition at line 109 of file Journal.h.