38#include "blocxx/BLOCXX_config.h"
59 unsigned int maxBackupIndex,
62 , m_filename(filename)
63 , m_maxFileSize(maxFileSize)
64 , m_maxBackupIndex(maxBackupIndex)
65 , m_flushLog(flushLog)
103 m_log <<
"FileAppender::doProcessLogMessage(): " <<
m_filename <<
" no longer exists and re-opening it failed!\n";
140 m_log <<
"FileAppender::doProcessLogMessage(): Failed to rename " <<
m_filename <<
" to " <<
m_filename +
".1! Logging to this file STOPPED!\n";
158 m_log <<
"FileAppender::doProcessLogMessage(): Failed to open " <<
m_filename <<
"! Logging to this file STOPPED!\n";
#define BLOCXX_THROW(exType, msg)
Throw an exception using FILE and LINE.
#define BLOCXX_GLOBAL_MUTEX_INIT()
#define BLOCXX_GLOBAL_STRING_INIT(str)
static const GlobalString STR_DEFAULT_MESSAGE_PATTERN
static UInt64 const NO_MAX_LOG_SIZE
virtual void doProcessLogMessage(const String &formattedMessage, const LogMessage &message) const
unsigned int m_maxBackupIndex
FileAppender(const StringArray &components, const StringArray &categories, const char *filename, const String &pattern, UInt64 maxFileSize, unsigned int maxBackupIndex, bool flushLog=true)
This class can be used to store a global variable that is lazily initialized in a thread safe manner.
This String class is an abstract data type that represents as NULL terminated string of characters.
const char * c_str() const
BLOCXX_COMMON_API bool exists(const String &path)
BLOCXX_COMMON_API bool removeFile(const String &path)
Remove the given file.
BLOCXX_COMMON_API bool renameFile(const String &oldFileName, const String &newFileName)
Rename the given file to the new name.