Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Attributes |
List of all members
Logger Class Reference
#include <Logger.h>
Public Types | |
enum | Level { 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) |
bool | IsLoggingToConsole () |
void | SetLogFile (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) |
std::string | to_string (int i) |
std::string | to_string (unsigned int i) |
std::string | to_string (size_t t) |
std::string | to_string (float f) |
std::string | to_string (double d) |
Static Public Member Functions | |
static void | Initialize () |
static void | Deinitialize () |
Protected Member Functions | |
virtual std::string | FormatLogMessage (std::string const &origin, std::string const &msg) |
Protected Attributes | |
LoggerForward * | m_Forward |
const SEScalarTime * | m_time |
std::stringstream | m_ss |
Private Attributes | |
friend | Loggable |
log_lib * | _log_lib |
Member Enumeration Documentation
◆ Level
|
strong |
Constructor & Destructor Documentation
◆ Logger()
Logger::Logger | ( | std::string const & | logFilename = Loggable::empty | ) |
◆ ~Logger()
|
virtual |
Member Function Documentation
◆ Debug() [1/3]
|
virtual |
◆ Debug() [2/3]
|
virtual |
◆ Debug() [3/3]
|
virtual |
◆ Deinitialize()
|
static |
◆ Error() [1/3]
|
virtual |
◆ Error() [2/3]
|
virtual |
◆ Error() [3/3]
|
virtual |
◆ Fatal() [1/3]
|
virtual |
◆ Fatal() [2/3]
|
virtual |
◆ Fatal() [3/3]
|
virtual |
◆ FormatLogMessage()
|
protectedvirtual |
◆ GetLogLevel()
Logger::Level Logger::GetLogLevel | ( | ) |
◆ HasForward()
|
virtual |
◆ Info() [1/4]
|
virtual |
◆ Info() [2/4]
|
virtual |
◆ Info() [3/4]
|
virtual |
◆ Info() [4/4]
|
virtual |
◆ Initialize()
|
static |
◆ IsLoggingToConsole()
bool Logger::IsLoggingToConsole | ( | ) |
◆ LogToConsole()
void Logger::LogToConsole | ( | bool | b | ) |
◆ SetForward()
|
virtual |
◆ SetLogFile()
void Logger::SetLogFile | ( | std::string const & | logFilename = Loggable::empty | ) |
◆ SetLogLevel()
void Logger::SetLogLevel | ( | Logger::Level | l | ) |
◆ SetLogTime()
|
virtual |
◆ to_string() [1/5]
|
inline |
◆ to_string() [2/5]
|
inline |
◆ to_string() [3/5]
|
inline |
◆ to_string() [4/5]
|
inline |
◆ to_string() [5/5]
|
inline |
◆ Warning() [1/3]
|
virtual |
◆ Warning() [2/3]
|
virtual |
◆ Warning() [3/3]
|
virtual |
Member Data Documentation
◆ _log_lib
|
private |
◆ Loggable
|
private |
◆ m_Forward
|
protected |
◆ m_ss
|
protected |
◆ m_time
|
protected |