opensurgsim
Public Member Functions | Protected Member Functions | List of all members
SurgSim::Framework::LogMessageBase Class Reference

LogMessageBase is a base class to be used to customize messages for logging textual information can be put into a log message by using the << operator in general the message class will output all of its information when the destructor is being invoked, formats the incoming message to timestamp it and adds information about the logger. More...

#include <LogMessageBase.h>

Inheritance diagram for SurgSim::Framework::LogMessageBase:
SurgSim::Framework::AssertMessage SurgSim::Framework::LogMessage

Public Member Functions

 LogMessageBase (Logger *logger, int level)
 Construct a LogMessage. More...
 
 ~LogMessageBase ()
 Destructor.
 
template<typename T >
LogMessageBaseoperator<< (T &&input)
 Add the given input to the current log message. More...
 
LogMessageBaseoperator<< (std::ios_base &(*manipulator)(std::ios_base &))
 
LogMessageBaseoperator<< (std::ostream &(*manipulator)(std::ostream &))
 

Protected Member Functions

std::string getMessage ()
 
void flush ()
 write the current message to the logger
 

Detailed Description

LogMessageBase is a base class to be used to customize messages for logging textual information can be put into a log message by using the << operator in general the message class will output all of its information when the destructor is being invoked, formats the incoming message to timestamp it and adds information about the logger.

Constructor & Destructor Documentation

§ LogMessageBase()

SurgSim::Framework::LogMessageBase::LogMessageBase ( Logger logger,
int  level 
)

Construct a LogMessage.

Parameters
loggerThe logger to be used
levelThe logging level for this message

Member Function Documentation

§ getMessage()

std::string SurgSim::Framework::LogMessageBase::getMessage ( )
inlineprotected
Returns
the current content of the message to be logged

§ operator<<()

template<typename T >
LogMessageBase& SurgSim::Framework::LogMessageBase::operator<< ( T &&  input)
inline

Add the given input to the current log message.

Parameters
inputThe input to be added to the current stream

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