#include <dailyrollingfileappender.h>
Public Types | |
enum | DatePattern { MINUTELY_ROLLOVER = 0, HOURLY_ROLLOVER, HALFDAILY_ROLLOVER, DAILY_ROLLOVER, WEEKLY_ROLLOVER, MONTHLY_ROLLOVER } |
Public Member Functions | |
DailyRollingFileAppender (QObject *pParent=0) | |
DailyRollingFileAppender (Layout *pLayout, const QString &rFileName, const QString &rDatePattern, QObject *pParent=0) | |
virtual | ~DailyRollingFileAppender () |
QString | datePattern () const |
void | setDatePattern (DatePattern datePattern) |
void | setDatePattern (const QString &rDatePattern) |
virtual void | activateOptions () |
Protected Member Functions | |
virtual void | append (const LoggingEvent &rEvent) |
virtual bool | checkEntryConditions () const |
virtual QDebug | debug (QDebug &rDebug) const |
Properties | |
QString | datePattern |
The ownership and lifetime of objects of this class are managed. See Object ownership for more details.
The enum DatePattern defines constants for date patterns.
Log4Qt::DailyRollingFileAppender::DailyRollingFileAppender | ( | QObject * | pParent = 0 |
) |
Log4Qt::DailyRollingFileAppender::DailyRollingFileAppender | ( | Layout * | pLayout, | |
const QString & | rFileName, | |||
const QString & | rDatePattern, | |||
QObject * | pParent = 0 | |||
) |
virtual Log4Qt::DailyRollingFileAppender::~DailyRollingFileAppender | ( | ) | [virtual] |
QString Log4Qt::DailyRollingFileAppender::datePattern | ( | ) | const |
void Log4Qt::DailyRollingFileAppender::setDatePattern | ( | DatePattern | datePattern | ) |
Sets the datePattern to the value specified by the datePattern constant.
void Log4Qt::DailyRollingFileAppender::setDatePattern | ( | const QString & | rDatePattern | ) | [inline] |
References Log4Qt::AppenderSkeleton::mObjectGuard.
virtual void Log4Qt::DailyRollingFileAppender::activateOptions | ( | ) | [virtual] |
Reimplemented from Log4Qt::FileAppender.
virtual void Log4Qt::DailyRollingFileAppender::append | ( | const LoggingEvent & | rEvent | ) | [protected, virtual] |
Reimplemented from Log4Qt::WriterAppender.
virtual bool Log4Qt::DailyRollingFileAppender::checkEntryConditions | ( | ) | const [protected, virtual] |
Tests if all entry conditions for using append() in this class are met.
If a conditions is not met, an error is logged and the function returns false. Otherwise the result of FileAppender::checkEntryConditions() is returned.
The checked conditions are:
The function is called as part of the checkEntryConditions() chain started by AppenderSkeleton::doAppend().
Reimplemented from Log4Qt::FileAppender.
virtual QDebug Log4Qt::DailyRollingFileAppender::debug | ( | QDebug & | rDebug | ) | const [protected, virtual] |
Writes all object member variables to the given debug stream rDebug and returns the stream.
DailyRollingFileAppender(name:"DRFA" activedatepattern:"'.'yyyy-MM-dd-hh-mm" appendfile:false bufferedio:true datepattern:"'.'yyyy-MM-dd-hh-mm" encoding:"" frequency:"MINUTELY_ROLLOVER" file:"/log.txt" filter:0x0 immediateflush:true isactive:true isclosed:false layout:"TTCC" referencecount:1 rollovertime:QDateTime("Mon Oct 22 05:23:00 2007") threshold: "NULL" writer: 0x0 )
Reimplemented from Log4Qt::FileAppender.
QString Log4Qt::DailyRollingFileAppender::datePattern [inline, read, write] |
The property holds the date pattern used by the appender.
The default is DAILY_ROLLOVER for rollover at midnight each day.