libsdr  0.1.0
A simple SDR library
Public Member Functions | Protected Attributes | List of all members
sdr::StreamLogHandler Class Reference

Serializes log message into the specified stream. More...

#include <logger.hh>

Inheritance diagram for sdr::StreamLogHandler:
sdr::LogHandler

Public Member Functions

 StreamLogHandler (std::ostream &stream, LogLevel level)
 Constructor. More...
 
virtual ~StreamLogHandler ()
 Destructor. More...
 
virtual void handle (const LogMessage &msg)
 Handles the message. More...
 
- Public Member Functions inherited from sdr::LogHandler
virtual ~LogHandler ()
 Destructor. More...
 

Protected Attributes

std::ostream & _stream
 The output stream. More...
 
LogLevel _level
 The minimum log-level. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sdr::LogHandler
 LogHandler ()
 Hidden constructor. More...
 

Detailed Description

Serializes log message into the specified stream.

Constructor & Destructor Documentation

StreamLogHandler::StreamLogHandler ( std::ostream &  stream,
LogLevel  level 
)

Constructor.

Parameters
streamSpecifies the stream, the messages are serialized into.
levelSpecifies the minimum log level of the messages being serialized.
StreamLogHandler::~StreamLogHandler ( )
virtual

Destructor.

Member Function Documentation

void StreamLogHandler::handle ( const LogMessage msg)
virtual

Handles the message.

Implements sdr::LogHandler.

Member Data Documentation

LogLevel sdr::StreamLogHandler::_level
protected

The minimum log-level.

std::ostream& sdr::StreamLogHandler::_stream
protected

The output stream.


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