Log4Qt::RollingFileAppender Class Reference

The class RollingFileAppender extends FileAppender to backup the log files when they reach a certain size. More...

#include <rollingfileappender.h>

Inheritance diagram for Log4Qt::RollingFileAppender:

Log4Qt::FileAppender Log4Qt::WriterAppender Log4Qt::AppenderSkeleton Log4Qt::Appender Log4Qt::LogObject

List of all members.

Public Member Functions

 RollingFileAppender (QObject *pParent=0)
 RollingFileAppender (Layout *pLayout, const QString &rFileName, QObject *pParent=0)
 RollingFileAppender (Layout *pLayout, const QString &rFileName, bool append, QObject *pParent=0)
virtual ~RollingFileAppender ()
int maxBackupIndex () const
qint64 maximumFileSize () const
void setMaxBackupIndex (int maxBackupIndex)
void setMaximumFileSize (qint64 maximumFileSize)
void setMaxFileSize (const QString &rMaxFileSize)

Protected Member Functions

virtual void append (const LoggingEvent &rEvent)
virtual QDebug debug (QDebug &rDebug) const

Properties

int maxBackupIndex
qint64 maximumFileSize
QString maxFileSize


Detailed Description

The class RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.

Note:
All the functions declared in this class are thread-safe.

The ownership and lifetime of objects of this class are managed. See Object ownership for more details.


Constructor & Destructor Documentation

Log4Qt::RollingFileAppender::RollingFileAppender ( QObject *  pParent = 0  ) 

Log4Qt::RollingFileAppender::RollingFileAppender ( Layout pLayout,
const QString &  rFileName,
QObject *  pParent = 0 
)

Log4Qt::RollingFileAppender::RollingFileAppender ( Layout pLayout,
const QString &  rFileName,
bool  append,
QObject *  pParent = 0 
)

virtual Log4Qt::RollingFileAppender::~RollingFileAppender (  )  [virtual]


Member Function Documentation

int Log4Qt::RollingFileAppender::maxBackupIndex (  )  const

qint64 Log4Qt::RollingFileAppender::maximumFileSize (  )  const

void Log4Qt::RollingFileAppender::setMaxBackupIndex ( int  maxBackupIndex  )  [inline]

void Log4Qt::RollingFileAppender::setMaximumFileSize ( qint64  maximumFileSize  )  [inline]

void Log4Qt::RollingFileAppender::setMaxFileSize ( const QString &  rMaxFileSize  ) 

virtual void Log4Qt::RollingFileAppender::append ( const LoggingEvent rEvent  )  [protected, virtual]

Reimplemented from Log4Qt::WriterAppender.

virtual QDebug Log4Qt::RollingFileAppender::debug ( QDebug &  rDebug  )  const [protected, virtual]

Writes all object member variables to the given debug stream rDebug and returns the stream.

RollingFileAppender(name:"RFA" appendfile:false bufferedio:true encoding:"" file:"/log.txt" filter: 0x0 immediateflush:true isactive:true isclosed:false layout:"TTCC" maxbackupindex:2 maximumfilesize:40 referencecount:1 threshold:"NULL" writer:0x4175af8)

See also:
QDebug, operator<<(QDebug debug, const LogObject &rLogObject)

Reimplemented from Log4Qt::FileAppender.


Property Documentation

int Log4Qt::RollingFileAppender::maxBackupIndex [inline, read, write]

The property holds the maximum backup count used by the appender.

The default is 1.

See also:
maxBackupIndex(), setMaxBackupIndex()

qint64 Log4Qt::RollingFileAppender::maximumFileSize [inline, read, write]

The property holds the maximum file size used by the appender.

The default is 10 MB (10 * 1024 * 1024).

See also:
maximumFileSize(), setMaximumFileSize()

QString Log4Qt::RollingFileAppender::maxFileSize [write]

The property sets the maximum file size from a string value.

See also:
setMaxFileSize(), maximumFileSize()


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

Generated on Sun Mar 1 16:40:46 2009 for Log4Qt by  doxygen 1.5.6