38#include "blocxx/BLOCXX_config.h"
59 unsigned int maxBackupIndex,
94 temp.open(
m_filename.c_str(), std::ios::out | std::ios::app);
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";
148 temp.open(
m_filename.c_str(), std::ios::out | std::ios::app);
154 m_log.open(
m_filename.c_str(), std::ios_base::out | std::ios_base::trunc);
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)
LogAppender(const StringArray &components=ALL_COMPONENTS, const StringArray &categories=ALL_CATEGORIES, const String &pattern=STR_TTCC_MESSAGE_FORMAT)
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.
LazyGlobal< String, char const *const > GlobalString
Array< String > StringArray
LazyGlobal< Mutex, int, GlobalMutexFactory > GlobalMutex