#include <Logger.h>

Public Types

enum  level {
  level::Trace, level::Debug, level::Info, level::Warn,
  level::Error, level::Fatal
}
 

Public Member Functions

 Logger (std::string const &logFilename=Loggable::empty)
 
virtual ~Logger ()
 
void LogToConsole (bool b)
 
void ResetLogFile (std::string const &logFilename=Loggable::empty)
 
void SetLogLevel (level level)
 
level GetLogLevel ()
 
virtual void SetLogTime (const SEScalarTime *time)
 
virtual void SetForward (LoggerForward *forward)
 
virtual bool HasForward ()
 
virtual void Debug (std::string const &msg, std::string const &origin=Loggable::empty)
 
virtual void Debug (std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Debug (std::ostream &msg, std::string const &origin=Loggable::empty)
 
virtual void Info (std::string const &msg, std::string const &origin=Loggable::empty)
 
virtual void Info (std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Info (const std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Info (std::ostream &msg, std::string const &origin=Loggable::empty)
 
virtual void Warning (std::string const &msg, std::string const &origin=Loggable::empty)
 
virtual void Warning (std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Warning (std::ostream &msg, std::string const &origin=Loggable::empty)
 
virtual void Error (std::string const &msg, std::string const &origin=Loggable::empty)
 
virtual void Error (std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Error (std::ostream &msg, std::string const &origin=Loggable::empty)
 
virtual void Fatal (std::string const &msg, std::string const &origin=Loggable::empty)
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=Loggable::empty)
 
virtual void Fatal (std::ostream &msg, std::string const &origin=Loggable::empty)
 

Protected Member Functions

virtual std::string FormatLogMessage (std::string const &origin, std::string const &msg)
 

Protected Attributes

LoggerForwardm_Forward
 
const SEScalarTimem_time
 
std::stringstream m_ss
 

Private Attributes

friend Loggable
 
log_lib_log_lib
 

Member Enumeration Documentation

◆ level

enum Logger::level
strong
Enumerator
Trace 
Debug 
Info 
Warn 
Error 
Fatal 

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( std::string const &  logFilename = Loggable::empty)

◆ ~Logger()

Logger::~Logger ( )
virtual

Member Function Documentation

◆ Debug() [1/3]

void Logger::Debug ( std::string const &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Debug() [2/3]

void Logger::Debug ( std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Debug() [3/3]

void Logger::Debug ( std::ostream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Error() [1/3]

void Logger::Error ( std::string const &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Error() [2/3]

void Logger::Error ( std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Error() [3/3]

void Logger::Error ( std::ostream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Fatal() [1/3]

void Logger::Fatal ( std::string const &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Fatal() [2/3]

void Logger::Fatal ( std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Fatal() [3/3]

void Logger::Fatal ( std::ostream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ FormatLogMessage()

std::string Logger::FormatLogMessage ( std::string const &  origin,
std::string const &  msg 
)
protectedvirtual

◆ GetLogLevel()

Logger::level Logger::GetLogLevel ( )

◆ HasForward()

bool Logger::HasForward ( )
virtual

◆ Info() [1/4]

void Logger::Info ( std::string const &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Info() [2/4]

void Logger::Info ( std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Info() [3/4]

void Logger::Info ( const std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Info() [4/4]

void Logger::Info ( std::ostream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ LogToConsole()

void Logger::LogToConsole ( bool  b)

◆ ResetLogFile()

void Logger::ResetLogFile ( std::string const &  logFilename = Loggable::empty)

◆ SetForward()

void Logger::SetForward ( LoggerForward forward)
virtual

◆ SetLogLevel()

void Logger::SetLogLevel ( Logger::level  l)

◆ SetLogTime()

void Logger::SetLogTime ( const SEScalarTime time)
virtual

◆ Warning() [1/3]

void Logger::Warning ( std::string const &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Warning() [2/3]

void Logger::Warning ( std::stringstream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

◆ Warning() [3/3]

void Logger::Warning ( std::ostream &  msg,
std::string const &  origin = Loggable::empty 
)
virtual

Member Data Documentation

◆ _log_lib

log_lib* Logger::_log_lib
private

◆ Loggable

friend Logger::Loggable
private

◆ m_Forward

LoggerForward* Logger::m_Forward
protected

◆ m_ss

std::stringstream Logger::m_ss
protected

◆ m_time

const SEScalarTime* Logger::m_time
protected