AnCH Framework 0.1
Another C++ Hack Framework
Loading...
Searching...
No Matches
anch::log::Writer Class Referenceabstract

Logger writter definition. More...

#include <writer.hpp>

Inheritance diagram for anch::log::Writer:
Collaboration diagram for anch::log::Writer:

Public Member Functions

 Writer (const anch::conf::Section &conf)
virtual ~Writer ()
virtual void write (const std::string &message)=0

Protected Member Functions

std::string format (const std::string &msg)

Detailed Description

Logger writter definition.

Provides format message function and define write function based on MDC.

Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ Writer()

anch::log::Writer::Writer ( const anch::conf::Section & conf)

Writer constructor

Parameters
confthe writer's configuration

◆ ~Writer()

virtual anch::log::Writer::~Writer ( )
virtual

Writer destructor

Member Function Documentation

◆ format()

std::string anch::log::Writer::format ( const std::string & msg)
protected

Format message according to writer message formatter

Parameters
msgthe message
Returns
the formatted log line

◆ write()

virtual void anch::log::Writer::write ( const std::string & message)
pure virtual

Write message in the file

Parameters
messageMessage to write

Implemented in anch::log::ConsoleWriter, anch::log::FileWriter, anch::log::LowPriorityWriter, and anch::log::ThreadSafeWriter.


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