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

#include <FileHandler.hpp>

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

Public Member Functions

 FileHandler (const std::string &name, const std::string &filename, bool truncate)
 
 FileHandler (const FileHandler &)=delete
 
 FileHandler (FileHandler &&)=delete
 
FileHandleroperator= (const FileHandler &)=delete
 
FileHandleroperator= (FileHandler &&)=delete
 
 ~FileHandler ()
 
void handle (const priv::Message &msg)
 
void flush ()
 
- Public Member Functions inherited from lug::System::Logger::Handler
 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)
 
bool shouldLog (Level level) const
 
void setLevel (Level level)
 
Level getLevel () const
 

Private Attributes

std::ofstream _ofs
 

Additional Inherited Members

- Protected Attributes inherited from lug::System::Logger::Handler
std::string _name
 
std::unique_ptr< Formatter_formatter
 
Level _level
 

Detailed Description

Definition at line 12 of file FileHandler.hpp.

Constructor & Destructor Documentation

◆ FileHandler() [1/3]

lug::System::Logger::FileHandler::FileHandler ( const std::string &  name,
const std::string &  filename,
bool  truncate 
)

Definition at line 8 of file FileHandler.cpp.

◆ FileHandler() [2/3]

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

◆ FileHandler() [3/3]

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

◆ ~FileHandler()

lug::System::Logger::FileHandler::~FileHandler ( )

Definition at line 23 of file FileHandler.cpp.

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ handle()

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

Implements lug::System::Logger::Handler.

Definition at line 27 of file FileHandler.cpp.

◆ flush()

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

Implements lug::System::Logger::Handler.

Definition at line 31 of file FileHandler.cpp.

Member Data Documentation

◆ _ofs

std::ofstream lug::System::Logger::FileHandler::_ofs
private

Definition at line 30 of file FileHandler.hpp.


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