Lugdunum  0.1.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lug::System::Logger::Logger Class Reference

#include <Logger.hpp>

Collaboration diagram for lug::System::Logger::Logger:
[legend]

Public Member Functions

 Logger (const std::string &loggerName)
 
 Logger (const Logger &)=delete
 
 Logger (Logger &&)=default
 
Loggeroperator= (const Logger &)=delete
 
Loggeroperator= (Logger &&)=default
 
 ~Logger ()=default
 
void addHandler (Handler *handler)
 
void addHandler (const std::string &name)
 
void defaultErrHandler (const std::string &msg)
 
void defaultErrHandler (const std::exception &ex)
 
template<typename T >
void log (Level lvl, const T &msg)
 
template<typename... Args, typename T >
void log (Level lvl, const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void debug (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void info (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void warn (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void error (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void fatal (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void assrt (const T &fmt, Args &&... args)
 
const std::string & getName () const
 
void handle (priv::Message &msg)
 
void flush ()
 
template<typename T >
void log (Level lvl, const T &msg)
 
template<typename... Args, typename T >
void log (Level lvl, const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void debug (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void info (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void warn (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void error (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void fatal (const T &fmt, Args &&... args)
 
template<typename T , typename... Args>
void assrt (const T &fmt, Args &&... args)
 

Static Public Member Functions

static LoggergetInternalLogger ()
 

Protected Attributes

const std::string _name
 
std::set< Handler * > _handlers
 

Detailed Description

Definition at line 18 of file Logger.hpp.

Constructor & Destructor Documentation

◆ Logger() [1/3]

lug::System::Logger::Logger::Logger ( const std::string &  loggerName)
explicit

Definition at line 19 of file Logger.cpp.

◆ Logger() [2/3]

lug::System::Logger::Logger::Logger ( const Logger )
delete

◆ Logger() [3/3]

lug::System::Logger::Logger::Logger ( Logger &&  )
default

◆ ~Logger()

lug::System::Logger::Logger::~Logger ( )
default

Member Function Documentation

◆ operator=() [1/2]

Logger& lug::System::Logger::Logger::operator= ( const Logger )
delete

◆ operator=() [2/2]

Logger& lug::System::Logger::Logger::operator= ( Logger &&  )
default

◆ addHandler() [1/2]

void lug::System::Logger::Logger::addHandler ( Handler handler)

Definition at line 21 of file Logger.cpp.

◆ addHandler() [2/2]

void lug::System::Logger::Logger::addHandler ( const std::string &  name)

Definition at line 25 of file Logger.cpp.

◆ defaultErrHandler() [1/2]

void lug::System::Logger::Logger::defaultErrHandler ( const std::string &  msg)

Definition at line 29 of file Logger.cpp.

◆ defaultErrHandler() [2/2]

void lug::System::Logger::Logger::defaultErrHandler ( const std::exception &  ex)

Definition at line 33 of file Logger.cpp.

◆ log() [1/4]

template<typename T >
void lug::System::Logger::Logger::log ( Level  lvl,
const T &  msg 
)

◆ log() [2/4]

template<typename... Args, typename T >
void lug::System::Logger::Logger::log ( Level  lvl,
const T &  fmt,
Args &&...  args 
)

◆ debug() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::debug ( const T &  fmt,
Args &&...  args 
)

◆ info() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::info ( const T &  fmt,
Args &&...  args 
)

◆ warn() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::warn ( const T &  fmt,
Args &&...  args 
)

◆ error() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::error ( const T &  fmt,
Args &&...  args 
)

◆ fatal() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::fatal ( const T &  fmt,
Args &&...  args 
)

◆ assrt() [1/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::assrt ( const T &  fmt,
Args &&...  args 
)

◆ getName()

const std::string & lug::System::Logger::Logger::getName ( ) const

Definition at line 37 of file Logger.cpp.

◆ handle()

void lug::System::Logger::Logger::handle ( priv::Message &  msg)

Definition at line 41 of file Logger.cpp.

◆ flush()

void lug::System::Logger::Logger::flush ( )

Definition at line 50 of file Logger.cpp.

◆ getInternalLogger()

Logger & lug::System::Logger::Logger::getInternalLogger ( )
static

Definition at line 56 of file Logger.cpp.

◆ log() [3/4]

template<typename T >
void lug::System::Logger::Logger::log ( Level  lvl,
const T &  msg 
)
inline

Definition at line 2 of file Logger.inl.

◆ log() [4/4]

template<typename... Args, typename T >
void lug::System::Logger::Logger::log ( Level  lvl,
const T &  fmt,
Args &&...  args 
)
inline

Definition at line 13 of file Logger.inl.

◆ debug() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::debug ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 24 of file Logger.inl.

◆ info() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::info ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 29 of file Logger.inl.

◆ warn() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::warn ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 34 of file Logger.inl.

◆ error() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::error ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 39 of file Logger.inl.

◆ fatal() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::fatal ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 44 of file Logger.inl.

◆ assrt() [2/2]

template<typename T , typename... Args>
void lug::System::Logger::Logger::assrt ( const T &  fmt,
Args &&...  args 
)
inline

Definition at line 49 of file Logger.inl.

Member Data Documentation

◆ _name

const std::string lug::System::Logger::Logger::_name
protected

Definition at line 67 of file Logger.hpp.

◆ _handlers

std::set<Handler*> lug::System::Logger::Logger::_handlers
protected

Definition at line 68 of file Logger.hpp.


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