BLOCXX_NAMESPACE::FileAppender Class Reference

This class sends log messges to a file. More...

#include <FileAppender.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::FileAppender:

BLOCXX_NAMESPACE::LogAppender BLOCXX_NAMESPACE::IntrusiveCountableBase

List of all members.

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


Detailed Description

This class sends log messges to a file.

Definition at line 54 of file FileAppender.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

void BLOCXX_NAMESPACE::FileAppender::doProcessLogMessage ( const String formattedMessage,
const LogMessage message 
) const [protected, virtual]


Member Data Documentation

Definition at line 57 of file FileAppender.hpp.

Referenced by doProcessLogMessage().

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().

Definition at line 75 of file FileAppender.hpp.

Referenced by doProcessLogMessage().

Definition at line 76 of file FileAppender.hpp.

Referenced by doProcessLogMessage().

std::ofstream BLOCXX_NAMESPACE::FileAppender::m_log [mutable, private]

Definition at line 77 of file FileAppender.hpp.

Referenced by doProcessLogMessage(), and FileAppender().

Definition at line 78 of file FileAppender.hpp.

Referenced by doProcessLogMessage().


The documentation for this class was generated from the following files:

Generated on Wed Feb 25 19:05:05 2009 for blocxx by  doxygen 1.5.6