Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLOGGER::JStreamLogger Class Reference

Message logging based on std::ostream. More...

#include <JStreamLogger.hh>

Inheritance diagram for JLOGGER::JStreamLogger:
JLOGGER::JLogger

Public Member Functions

 JStreamLogger (std::ostream &__out)
 Constructor.
 
virtual void typeout (const std::string &tag, const std::string &message) override
 Report message.
 
JSYNCHRONIZATION::JMutexmutex ()
 Provides internal lock object.
 

Protected Attributes

std::ostream & out
 

Private Attributes

JSYNCHRONIZATION::JMutex m_mutex
 

Detailed Description

Message logging based on std::ostream.

This class implements the JLogger interface.

Definition at line 22 of file JStreamLogger.hh.

Constructor & Destructor Documentation

◆ JStreamLogger()

JLOGGER::JStreamLogger::JStreamLogger ( std::ostream & __out)
inline

Constructor.

Parameters
__outoutput stream

Definition at line 31 of file JStreamLogger.hh.

31 :
32 out(__out)
33 {}

Member Function Documentation

◆ typeout()

virtual void JLOGGER::JStreamLogger::typeout ( const std::string & tag,
const std::string & message )
inlineoverridevirtual

Report message.

Parameters
tagtag
messagemessage

Implements JLOGGER::JLogger.

Definition at line 42 of file JStreamLogger.hh.

44 {
45 out << tag << ' ' << message << std::endl;
46 }

◆ mutex()

JSYNCHRONIZATION::JMutex & JLOGGER::JLogger::mutex ( )
inlineinherited

Provides internal lock object.

Returns
reference to the internal mutex object.

Definition at line 44 of file JLogger.hh.

45 {
46 return m_mutex;
47 }
JSYNCHRONIZATION::JMutex m_mutex
Definition JLogger.hh:51

Member Data Documentation

◆ out

std::ostream& JLOGGER::JStreamLogger::out
protected

Definition at line 49 of file JStreamLogger.hh.

◆ m_mutex

JSYNCHRONIZATION::JMutex JLOGGER::JLogger::m_mutex
privateinherited

Definition at line 51 of file JLogger.hh.


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