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

#include <Handler.hpp>

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

Public Member Functions

 Handler (const std::string &name)
 
 Handler (const Handler &)=delete
 
 Handler (Handler &&)=delete
 
Handleroperator= (const Handler &)=delete
 
Handleroperator= (Handler &&)=delete
 
virtual ~Handler ()=default
 
void setFormatter (std::unique_ptr< Formatter > formatter)
 
void setPattern (const std::string &pattern)
 
void format (priv::Message &msg)
 
virtual void flush ()=0
 
virtual void handle (const priv::Message &msg)=0
 
bool shouldLog (Level level) const
 
void setLevel (Level level)
 
Level getLevel () const
 

Protected Attributes

std::string _name
 
std::unique_ptr< Formatter_formatter
 
Level _level
 

Detailed Description

Definition at line 15 of file Handler.hpp.

Constructor & Destructor Documentation

◆ Handler() [1/3]

lug::System::Logger::Handler::Handler ( const std::string &  name)
explicit

Definition at line 9 of file Handler.cpp.

◆ Handler() [2/3]

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

◆ Handler() [3/3]

lug::System::Logger::Handler::Handler ( Handler &&  )
delete

◆ ~Handler()

virtual lug::System::Logger::Handler::~Handler ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setFormatter()

void lug::System::Logger::Handler::setFormatter ( std::unique_ptr< Formatter formatter)

Definition at line 14 of file Handler.cpp.

◆ setPattern()

void lug::System::Logger::Handler::setPattern ( const std::string &  pattern)

Definition at line 18 of file Handler.cpp.

◆ format()

void lug::System::Logger::Handler::format ( priv::Message &  msg)

Definition at line 22 of file Handler.cpp.

◆ flush()

virtual void lug::System::Logger::Handler::flush ( )
pure virtual

◆ handle()

virtual void lug::System::Logger::Handler::handle ( const priv::Message &  msg)
pure virtual

◆ shouldLog()

bool lug::System::Logger::Handler::shouldLog ( Level  level) const

Definition at line 34 of file Handler.cpp.

◆ setLevel()

void lug::System::Logger::Handler::setLevel ( Level  level)

Definition at line 26 of file Handler.cpp.

◆ getLevel()

Level lug::System::Logger::Handler::getLevel ( ) const

Definition at line 30 of file Handler.cpp.

Member Data Documentation

◆ _name

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

Definition at line 39 of file Handler.hpp.

◆ _formatter

std::unique_ptr<Formatter> lug::System::Logger::Handler::_formatter
protected

Definition at line 40 of file Handler.hpp.

◆ _level

Level lug::System::Logger::Handler::_level
protected

Definition at line 41 of file Handler.hpp.


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