blocxx
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes

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 = 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

Detailed Description

This class sends log messges to a file.

Definition at line 54 of file FileAppender.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

Definition at line 74 of file FileAppender.hpp.

Referenced by doProcessLogMessage(), and FileAppender().

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

Definition at line 76 of file FileAppender.hpp.

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.

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.


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