#include <listappender.h>
Public Member Functions | |
ListAppender (QObject *pParent=0) | |
virtual | ~ListAppender () |
bool | configuratorList () const |
QList< LoggingEvent > | list () const |
int | maxCount () const |
void | setConfiguratorList (bool isConfiguratorList) |
void | setMaxCount (int n) |
QList< LoggingEvent > | clearList () |
virtual bool | requiresLayout () const |
Protected Member Functions | |
virtual void | append (const LoggingEvent &rEvent) |
virtual QDebug | debug (QDebug &rDebug) const |
void | ensureMaxCount () |
Properties | |
bool | configuratorList |
int | maxCount |
The ownership and lifetime of objects of this class are managed. See Object ownership for more details.
Log4Qt::ListAppender::ListAppender | ( | QObject * | pParent = 0 |
) |
virtual Log4Qt::ListAppender::~ListAppender | ( | ) | [virtual] |
bool Log4Qt::ListAppender::configuratorList | ( | ) | const |
Returns true, if the appender is used by a configurator. Otherweise it returns false.
QList<LoggingEvent> Log4Qt::ListAppender::list | ( | ) | const |
int Log4Qt::ListAppender::maxCount | ( | ) | const |
void Log4Qt::ListAppender::setConfiguratorList | ( | bool | isConfiguratorList | ) | [inline] |
Sets that the appender is used by a configurator. If set to true, the appender will not be removed from a Logger when Logger::removeAllAppenders()is called. This way the appender can collect events raised during the configuration process.
void Log4Qt::ListAppender::setMaxCount | ( | int | n | ) |
QList<LoggingEvent> Log4Qt::ListAppender::clearList | ( | ) |
bool Log4Qt::ListAppender::requiresLayout | ( | ) | const [inline, virtual] |
Implements Log4Qt::Appender.
virtual void Log4Qt::ListAppender::append | ( | const LoggingEvent & | rEvent | ) | [protected, virtual] |
Implements Log4Qt::AppenderSkeleton.
virtual QDebug Log4Qt::ListAppender::debug | ( | QDebug & | rDebug | ) | const [protected, virtual] |
Writes all object member variables to the given debug stream rDebug and returns the stream.
ListAppender(name:"LA" count:1 filter:0x41fa488 isactive:true isclosed:false maxcount:170 referencecount:1 threshold:"TRACE_SET")
Implements Log4Qt::LogObject.
void Log4Qt::ListAppender::ensureMaxCount | ( | ) | [protected] |
Ensures that the count of events is less or equal then the maxium count. If the list contains too many items, items are deleted from the begin of the list.
bool Log4Qt::ListAppender::configuratorList [inline, read, write] |
The property holds, if the Appender is used by a configurator.
The default value is false for not being a configurator list.
int Log4Qt::ListAppender::maxCount [inline, read, write] |
The property holds the maximum count used by the appender.
The default maximum count is -1 for unlimited.