![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
#include <threadSafeWriter.hpp>
Public Member Functions | |
ThreadSafeWriter (const std::string &fileName, const std::string &linePattern, int maxSize=0, int maxIndex=0) | |
ThreadSafeWriter (std::ostream *output, const std::string &linePattern) | |
virtual | ~ThreadSafeWriter () |
virtual void | write (const std::string &category, const anch::logger::Level &level, const std::string &message) |
![]() | |
Writer (const std::string &fileName, const std::string &linePattern, int maxSize=0, int maxIndex=0) | |
Writer (std::ostream *output, const std::string &linePattern) | |
virtual | ~Writer () |
Additional Inherited Members | |
![]() | |
bool | rotate () const |
void | rotateFiles () |
![]() | |
std::ostream * | _output |
anch::logger::formatter::MessageFormatter | _formatter |
File writer which manage conccurency access
ThreadSafeWriter::ThreadSafeWriter | ( | const std::string & | fileName, |
const std::string & | linePattern, | ||
int | maxSize = 0 , |
||
int | maxIndex = 0 |
||
) |
ThreadSafeWriter constructor
fileName | The file name |
linePattern | The line pattern |
maxSize | The file maximum size before file rotation |
maxIndex | The maximum number of log files to keep |
ThreadSafeWriter::ThreadSafeWriter | ( | std::ostream * | output, |
const std::string & | linePattern | ||
) |
ThreadSafeWriter constructor
output | The output to use |
linePattern | The line pattern |
|
virtual |
ThreadSafeWriter destructor
|
virtual |
Write message in the file
category | The logger category |
level | The message level |
message | Message to write |
Reimplemented from anch::logger::Writer.