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

#include <lowPriorityWriter.hpp>

+ Inheritance diagram for anch::logger::LowPriorityWriter:
+ Collaboration diagram for anch::logger::LowPriorityWriter:

Public Member Functions

 LowPriorityWriter (const std::string &fileName, const std::string &linePattern, unsigned int maxSize=0, int maxIndex=0)
 
 LowPriorityWriter (std::ostream *output, const std::string &linePattern)
 
virtual ~LowPriorityWriter ()
 
virtual void write (const std::string &category, const anch::logger::Level &level, const std::string &message)
 
void startTreatment ()
 
- Public Member Functions inherited from anch::logger::Writer
 Writer (const std::string &fileName, const std::string &linePattern, unsigned int maxSize=0, int maxIndex=0)
 
 Writer (std::ostream *output, const std::string &linePattern)
 
virtual ~Writer ()
 

Additional Inherited Members

- Protected Member Functions inherited from anch::logger::Writer
bool rotate () const
 
void rotateFiles ()
 
- Protected Attributes inherited from anch::logger::Writer
std::ostream * _output
 
anch::logger::formatter::MessageFormatter _formatter
 

Detailed Description

File writer with QoS implementation to avoid performance lose when files are written.

Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ LowPriorityWriter() [1/2]

anch::logger::LowPriorityWriter::LowPriorityWriter ( const std::string & fileName,
const std::string & linePattern,
unsigned int maxSize = 0,
int maxIndex = 0 )

LowPriorityWriter constructor

Parameters
fileNameThe file name
linePatternThe line pattern
maxSizeThe file maximum size before file rotation
maxIndexThe maximum number of log files to keep

◆ LowPriorityWriter() [2/2]

anch::logger::LowPriorityWriter::LowPriorityWriter ( std::ostream * output,
const std::string & linePattern )

LowPriorityWriter constructor

Parameters
outputThe output to use
linePatternThe line pattern

◆ ~LowPriorityWriter()

virtual anch::logger::LowPriorityWriter::~LowPriorityWriter ( )
virtual

LowPriorityWriter destructor

Member Function Documentation

◆ startTreatment()

void anch::logger::LowPriorityWriter::startTreatment ( )

Start messages queue pooling

◆ write()

virtual void anch::logger::LowPriorityWriter::write ( const std::string & category,
const anch::logger::Level & level,
const std::string & message )
virtual

Write message in the file

Parameters
categoryThe logger category
levelThe message level
messageMessage to write

Reimplemented from anch::logger::Writer.


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