CppLogging  1.0.4.0
C++ Logging Library
Public Member Functions | List of all members
CppLogging::OstreamAppender Class Reference

Output stream (std::ostream) appender. More...

#include <ostream_appender.h>

Inheritance diagram for CppLogging::OstreamAppender:
CppLogging::Appender CppLogging::Element

Public Member Functions

 OstreamAppender (std::ostream &stream)
 Initialize the appender with a given output stream. More...
 
 OstreamAppender (const OstreamAppender &)=delete
 
 OstreamAppender (OstreamAppender &&)=delete
 
virtual ~OstreamAppender ()=default
 
OstreamAppenderoperator= (const OstreamAppender &)=delete
 
OstreamAppenderoperator= (OstreamAppender &&)=delete
 
void AppendRecord (Record &record) override
 Append the given logging record. More...
 
void Flush () override
 Flush the logging appender. More...
 
- Public Member Functions inherited from CppLogging::Element
virtual bool IsStarted () const noexcept
 Is the logging element started? More...
 
virtual bool Start ()
 Start the logging element. More...
 
virtual bool Stop ()
 Stop the logging element. More...
 

Detailed Description

Output stream (std::ostream) appender.

Output stream (std::ostream) appender prints the given logging record into the given instance of std::ostream.

Not thread-safe.

Definition at line 25 of file ostream_appender.h.

Constructor & Destructor Documentation

◆ OstreamAppender() [1/3]

CppLogging::OstreamAppender::OstreamAppender ( std::ostream &  stream)
inlineexplicit

Initialize the appender with a given output stream.

Parameters
stream- Output stream

Definition at line 32 of file ostream_appender.h.

◆ OstreamAppender() [2/3]

CppLogging::OstreamAppender::OstreamAppender ( const OstreamAppender )
delete

◆ OstreamAppender() [3/3]

CppLogging::OstreamAppender::OstreamAppender ( OstreamAppender &&  )
delete

◆ ~OstreamAppender()

virtual CppLogging::OstreamAppender::~OstreamAppender ( )
virtualdefault

Member Function Documentation

◆ AppendRecord()

void CppLogging::OstreamAppender::AppendRecord ( Record record)
overridevirtual

Append the given logging record.

Parameters
record- Logging record

Implements CppLogging::Appender.

Definition at line 13 of file ostream_appender.cpp.

◆ Flush()

void CppLogging::OstreamAppender::Flush ( )
overridevirtual

Flush the logging appender.

Reimplemented from CppLogging::Appender.

Definition at line 23 of file ostream_appender.cpp.

◆ operator=() [1/2]

OstreamAppender& CppLogging::OstreamAppender::operator= ( const OstreamAppender )
delete

◆ operator=() [2/2]

OstreamAppender& CppLogging::OstreamAppender::operator= ( OstreamAppender &&  )
delete

The documentation for this class was generated from the following files: