rippled
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
beast::Journal::Sink Class Referenceabstract

Abstraction for the underlying message destination. More...

Inheritance diagram for beast::Journal::Sink:
Inheritance graph
[legend]

Public Member Functions

virtual ~Sink ()=0
 
virtual bool active (Severity level) const
 Returns true if text at the passed severity produces output. More...
 
virtual bool console () const
 Returns true if a message is also written to the Output Window (MSVC). More...
 
virtual void console (bool output)
 Set whether messages are also written to the Output Window (MSVC). More...
 
virtual Severity threshold () const
 Returns the minimum severity level this sink will report. More...
 
virtual void threshold (Severity thresh)
 Set the minimum severity this sink will report. More...
 
virtual void write (Severity level, std::string const &text)=0
 Write text to the sink at the specified severity. More...
 

Protected Member Functions

 Sink ()=delete
 
 Sink (Sink const &sink)=default
 
 Sink (Severity thresh, bool console)
 
Sinkoperator= (Sink const &lhs)=delete
 

Private Attributes

Severity thresh_
 
bool m_console
 

Detailed Description

Abstraction for the underlying message destination.

Definition at line 74 of file Journal.h.

Constructor & Destructor Documentation

◆ Sink() [1/3]

beast::Journal::Sink::Sink ( )
protecteddelete

◆ Sink() [2/3]

beast::Journal::Sink::Sink ( Sink const &  sink)
explicitprotecteddefault

◆ Sink() [3/3]

beast::Journal::Sink::Sink ( Severity  thresh,
bool  console 
)
protected

Definition at line 80 of file beast_Journal.cpp.

◆ ~Sink()

beast::Journal::Sink::~Sink ( )
pure virtualdefault

Member Function Documentation

◆ operator=()

Sink& beast::Journal::Sink::operator= ( Sink const &  lhs)
protecteddelete

◆ active()

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

Returns true if text at the passed severity produces output.

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

Definition at line 88 of file beast_Journal.cpp.

◆ console() [1/2]

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

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

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

Definition at line 94 of file beast_Journal.cpp.

◆ console() [2/2]

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

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

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

Definition at line 100 of file beast_Journal.cpp.

◆ threshold() [1/2]

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

Returns the minimum severity level this sink will report.

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

Definition at line 106 of file beast_Journal.cpp.

◆ threshold() [2/2]

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

Set the minimum severity this sink will report.

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

Definition at line 112 of file beast_Journal.cpp.

◆ write()

virtual void beast::Journal::Sink::write ( Severity  level,
std::string const &  text 
)
pure virtual

Member Data Documentation

◆ thresh_

Severity beast::Journal::Sink::thresh_
private

Definition at line 116 of file Journal.h.

◆ m_console

bool beast::Journal::Sink::m_console
private

Definition at line 117 of file Journal.h.