#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 = { "%d{%a %b %d %H:%M:%S %Y} [%t]: %m" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
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 |
Definition at line 54 of file FileAppender.hpp.
| 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 54 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 75 of file FileAppender.cpp.
| void BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage | ( | const String & | formattedMessage, | |
| const LogMessage & | message | |||
| ) | const [protected, virtual] |
Implements BLOCXX_NAMESPACE::LogAppender.
Definition at line 85 of file FileAppender.cpp.
References BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::FileSystem::exists(), BLOCXX_NAMESPACE::fileGuard, i, BLOCXX_NAMESPACE::String::length(), m_filename, m_flushLog, m_log, m_maxBackupIndex, m_maxFileSize, NO_MAX_LOG_SIZE, BLOCXX_NAMESPACE::FileSystem::removeFile(), and BLOCXX_NAMESPACE::FileSystem::renameFile().
UInt64 const BLOCXX_NAMESPACE::FileAppender::NO_MAX_LOG_SIZE = 0 [static] |
unsigned int const BLOCXX_NAMESPACE::FileAppender::NO_MAX_BACKUP_INDEX = 0 [static] |
Definition at line 58 of file FileAppender.hpp.
const GlobalString BLOCXX_NAMESPACE::FileAppender::STR_DEFAULT_MESSAGE_PATTERN = { "%d{%a %b %d %H:%M:%S %Y} [%t]: %m" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } [static] |
Definition at line 69 of file FileAppender.hpp.
Definition at line 74 of file FileAppender.hpp.
Referenced by doProcessLogMessage(), and FileAppender().
unsigned int BLOCXX_NAMESPACE::FileAppender::m_maxBackupIndex [private] |
std::ofstream BLOCXX_NAMESPACE::FileAppender::m_log [mutable, private] |
Definition at line 77 of file FileAppender.hpp.
Referenced by doProcessLogMessage(), and FileAppender().
bool BLOCXX_NAMESPACE::FileAppender::m_flushLog [private] |
1.5.6