#include <Logger.h>

Public Types

enum class  Level {
  Debug , Info , Warn , Error ,
  Fatal
}
 

Public Member Functions

 Logger (std::string const &logFilename="")
 
virtual ~Logger ()
 
void LogToConsole (bool b)
 
bool IsLoggingToConsole ()
 
void SetLogFile (std::string const &logFilename="")
 
void SetLogLevel (Level level)
 
Level GetLogLevel () const
 
virtual void SetLogTime (const SEScalarTime *time)
 
virtual bool HasForward () const
 
virtual void AddForward (LoggerForward *forward)
 
virtual void RemoveForward (LoggerForward *forward)
 
virtual void RemoveForwards ()
 
virtual void Debug (std::string const &msg)
 
virtual void Debug (std::stringstream &msg)
 
virtual void Debug (std::ostream &msg)
 
virtual void Info (std::string const &msg)
 
virtual void Info (std::stringstream &msg)
 
virtual void Info (const std::stringstream &msg)
 
virtual void Info (std::ostream &msg)
 
virtual void Warning (std::string const &msg)
 
virtual void Warning (std::stringstream &msg)
 
virtual void Warning (std::ostream &msg)
 
virtual void Error (std::string const &msg)
 
virtual void Error (std::stringstream &msg)
 
virtual void Error (std::ostream &msg)
 
virtual void Fatal (std::string const &msg)
 
virtual void Fatal (std::stringstream &msg)
 
virtual void Fatal (std::ostream &msg)
 

Protected Member Functions

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

Protected Attributes

std::vector< LoggerForward * > m_Forwards
 
const SEScalarTimem_time
 

Private Attributes

friend Loggable
 
log_lib_log_lib
 

Member Enumeration Documentation

◆ Level

enum class Logger::Level
strong
Enumerator
Debug 
Info 
Warn 
Error 
Fatal 

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( std::string const &  logFilename = "")

◆ ~Logger()

Logger::~Logger ( )
virtual

Member Function Documentation

◆ AddForward()

void Logger::AddForward ( LoggerForward forward)
virtual

◆ Debug() [1/3]

void Logger::Debug ( std::ostream &  msg)
virtual

◆ Debug() [2/3]

void Logger::Debug ( std::string const &  msg)
virtual

◆ Debug() [3/3]

void Logger::Debug ( std::stringstream &  msg)
virtual

◆ Error() [1/3]

void Logger::Error ( std::ostream &  msg)
virtual

◆ Error() [2/3]

void Logger::Error ( std::string const &  msg)
virtual

◆ Error() [3/3]

void Logger::Error ( std::stringstream &  msg)
virtual

◆ Fatal() [1/3]

void Logger::Fatal ( std::ostream &  msg)
virtual

◆ Fatal() [2/3]

void Logger::Fatal ( std::string const &  msg)
virtual

◆ Fatal() [3/3]

void Logger::Fatal ( std::stringstream &  msg)
virtual

◆ FormatLogMessage()

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

◆ GetLogLevel()

Logger::Level Logger::GetLogLevel ( ) const

◆ HasForward()

bool Logger::HasForward ( ) const
virtual

◆ Info() [1/4]

void Logger::Info ( const std::stringstream &  msg)
virtual

◆ Info() [2/4]

void Logger::Info ( std::ostream &  msg)
virtual

◆ Info() [3/4]

void Logger::Info ( std::string const &  msg)
virtual

◆ Info() [4/4]

void Logger::Info ( std::stringstream &  msg)
virtual

◆ IsLoggingToConsole()

bool Logger::IsLoggingToConsole ( )

◆ LogToConsole()

void Logger::LogToConsole ( bool  b)

◆ RemoveForward()

void Logger::RemoveForward ( LoggerForward forward)
virtual

◆ RemoveForwards()

void Logger::RemoveForwards ( )
virtual

◆ SetLogFile()

void Logger::SetLogFile ( std::string const &  logFilename = "")

◆ SetLogLevel()

void Logger::SetLogLevel ( Logger::Level  l)

◆ SetLogTime()

void Logger::SetLogTime ( const SEScalarTime time)
virtual

◆ Warning() [1/3]

void Logger::Warning ( std::ostream &  msg)
virtual

◆ Warning() [2/3]

void Logger::Warning ( std::string const &  msg)
virtual

◆ Warning() [3/3]

void Logger::Warning ( std::stringstream &  msg)
virtual

Member Data Documentation

◆ _log_lib

log_lib* Logger::_log_lib
private

◆ Loggable

friend Logger::Loggable
private

◆ m_Forwards

std::vector<LoggerForward*> Logger::m_Forwards
protected

◆ m_time

const SEScalarTime* Logger::m_time
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.