rippled
Public Member Functions | Private Attributes | List of all members
beast::Journal::Stream Class Reference

Provide a light-weight way to check active() before string formatting. More...

Collaboration diagram for beast::Journal::Stream:
Collaboration graph
[legend]

Public Member Functions

 Stream ()
 Create a stream which produces no output. More...
 
 Stream (Sink &sink, Severity level)
 Create a stream that writes at the given level. More...
 
 Stream (Stream const &other)
 Construct or copy another Stream. More...
 
Streamoperator= (Stream const &other)=delete
 
Sinksink () const
 Returns the Sink that this Stream writes to. More...
 
Severity level () const
 Returns the Severity level of messages this Stream reports. More...
 
template<typename T >
Journal::ScopedStream operator<< (T const &t) const
 
bool active () const
 Returns true if sink logs anything at this stream's level. More...
 
 operator bool () const
 
ScopedStream operator<< (std::ostream &manip(std::ostream &)) const
 Output stream support. More...
 
template<typename T >
ScopedStream operator<< (T const &t) const
 

Private Attributes

Sinkm_sink
 
Severity m_level
 

Detailed Description

Provide a light-weight way to check active() before string formatting.

Definition at line 194 of file Journal.h.

Constructor & Destructor Documentation

◆ Stream() [1/3]

beast::Journal::Stream::Stream ( )
explicit

Create a stream which produces no output.

Definition at line 198 of file Journal.h.

◆ Stream() [2/3]

beast::Journal::Stream::Stream ( Sink sink,
Severity  level 
)

Create a stream that writes at the given level.

Constructor is inlined so checking active() very inexpensive.

Definition at line 207 of file Journal.h.

◆ Stream() [3/3]

beast::Journal::Stream::Stream ( Stream const &  other)

Construct or copy another Stream.

Definition at line 213 of file Journal.h.

Member Function Documentation

◆ operator=()

Stream& beast::Journal::Stream::operator= ( Stream const &  other)
delete

◆ sink()

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

Returns the Sink that this Stream writes to.

Definition at line 222 of file Journal.h.

◆ level()

Severity beast::Journal::Stream::level ( ) const

Returns the Severity level of messages this Stream reports.

Definition at line 229 of file Journal.h.

◆ active()

bool beast::Journal::Stream::active ( ) const

Returns true if sink logs anything at this stream's level.

Definition at line 237 of file Journal.h.

◆ operator bool()

beast::Journal::Stream::operator bool ( ) const
explicit

Definition at line 242 of file Journal.h.

◆ operator<<() [1/3]

Journal::ScopedStream beast::Journal::Stream::operator<< ( std::ostream manipstd::ostream &) const

Output stream support.

Definition at line 155 of file beast_Journal.cpp.

◆ operator<<() [2/3]

template<typename T >
ScopedStream beast::Journal::Stream::operator<< ( T const &  t) const

◆ operator<<() [3/3]

template<typename T >
Journal::ScopedStream beast::Journal::Stream::operator<< ( T const &  t) const

Definition at line 376 of file Journal.h.

Member Data Documentation

◆ m_sink

Sink& beast::Journal::Stream::m_sink
private

Definition at line 259 of file Journal.h.

◆ m_level

Severity beast::Journal::Stream::m_level
private

Definition at line 260 of file Journal.h.