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

#include <threadSafeWriter.hpp>

Inheritance diagram for anch::log::ThreadSafeWriter:
Collaboration diagram for anch::log::ThreadSafeWriter:

Public Member Functions

 ThreadSafeWriter (const anch::conf::Section &conf)
virtual ~ThreadSafeWriter ()
virtual void write (const std::string &message) override
Public Member Functions inherited from anch::log::FileWriter
 FileWriter (const anch::conf::Section &conf)
virtual ~FileWriter ()
Public Member Functions inherited from anch::log::Writer
 Writer (const anch::conf::Section &conf)
virtual ~Writer ()

Additional Inherited Members

Protected Member Functions inherited from anch::log::FileWriter
bool rotate () const
void rotateFiles ()
Protected Member Functions inherited from anch::log::Writer
std::string format (const std::string &msg)
Protected Attributes inherited from anch::log::FileWriter
std::ofstream * _output
std::filesystem::path _path
uint32_t _maxSize
int _maxIdx
int _fileIdx

Detailed Description

File writer which manage conccurency access

Author
Vincent Lachenal
Since
0.1

Constructor & Destructor Documentation

◆ ThreadSafeWriter()

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

ThreadSafeWriter constructor

Parameters
confthe writer's configuration

◆ ~ThreadSafeWriter()

virtual anch::log::ThreadSafeWriter::~ThreadSafeWriter ( )
virtual

ThreadSafeWriter destructor

Member Function Documentation

◆ write()

virtual void anch::log::ThreadSafeWriter::write ( const std::string & message)
overridevirtual

Write message in the file.
Rotate log file when needed.

Parameters
messageMessage to write

Reimplemented from anch::log::FileWriter.


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