blocxx
|
This class sends log messges to a file. More...
#include <FileAppender.hpp>
Public Member Functions | |
FileAppender (const StringArray &components, const StringArray &categories, const char *filename, const String &pattern, UInt64 maxFileSize, unsigned int maxBackupIndex, bool flushLog=true) | |
virtual | ~FileAppender () |
Static Public Attributes | |
static UInt64 const | NO_MAX_LOG_SIZE = 0 |
static unsigned int const | NO_MAX_BACKUP_INDEX = 0 |
static const GlobalString | STR_DEFAULT_MESSAGE_PATTERN = BLOCXX_GLOBAL_STRING_INIT("%d{%a %b %d %H:%M:%S %Y} [%t]: %m") |
Protected Member Functions | |
virtual void | doProcessLogMessage (const String &formattedMessage, const LogMessage &message) const |
Private Attributes | |
String | m_filename |
UInt64 | m_maxFileSize |
unsigned int | m_maxBackupIndex |
std::ofstream | m_log |
bool | m_flushLog |
This class sends log messges to a file.
Definition at line 54 of file FileAppender.hpp.
usr src packages BUILD blocxx src blocxx FileAppender cpp usr src packages BUILD blocxx src blocxx FileAppender cpp usr src packages BUILD blocxx src blocxx FileAppender cpp BLOCXX_NAMESPACE::FileAppender::FileAppender | ( | const StringArray & | components, |
const StringArray & | categories, | ||
const char * | filename, | ||
const String & | pattern, | ||
UInt64 | maxFileSize, | ||
unsigned int | maxBackupIndex, | ||
bool | flushLog = true |
||
) |
Definition at line 57 of file FileAppender.cpp.
References BLOCXX_THROW, BLOCXX_NAMESPACE::String::c_str(), m_filename, and m_log.
BLOCXX_NAMESPACE::FileAppender::~FileAppender | ( | ) | [virtual] |
Definition at line 78 of file FileAppender.cpp.
References BLOCXX_GLOBAL_MUTEX_INIT.
void BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage | ( | const String & | formattedMessage, |
const LogMessage & | message | ||
) | const [protected, virtual] |
Implements BLOCXX_NAMESPACE::LogAppender.
Definition at line 88 of file FileAppender.cpp.
References BLOCXX_NAMESPACE::String::c_str(), m_filename, and m_log.
Definition at line 74 of file FileAppender.hpp.
Referenced by doProcessLogMessage(), and FileAppender().
bool BLOCXX_NAMESPACE::FileAppender::m_flushLog [private] |
Definition at line 78 of file FileAppender.hpp.
std::ofstream BLOCXX_NAMESPACE::FileAppender::m_log [mutable, private] |
Definition at line 77 of file FileAppender.hpp.
Referenced by doProcessLogMessage(), and FileAppender().
unsigned int BLOCXX_NAMESPACE::FileAppender::m_maxBackupIndex [private] |
Definition at line 76 of file FileAppender.hpp.
UInt64 BLOCXX_NAMESPACE::FileAppender::m_maxFileSize [private] |
Definition at line 75 of file FileAppender.hpp.
unsigned int const BLOCXX_NAMESPACE::FileAppender::NO_MAX_BACKUP_INDEX = 0 [static] |
Definition at line 58 of file FileAppender.hpp.
UInt64 const BLOCXX_NAMESPACE::FileAppender::NO_MAX_LOG_SIZE = 0 [static] |
Definition at line 57 of file FileAppender.hpp.
const GlobalString BLOCXX_NAMESPACE::FileAppender::STR_DEFAULT_MESSAGE_PATTERN = BLOCXX_GLOBAL_STRING_INIT("%d{%a %b %d %H:%M:%S %Y} [%t]: %m") [static] |
Definition at line 69 of file FileAppender.hpp.