Log4Qt::ListAppender Class Reference

The class ListAppender appends logging events to a list for later processing. More...

#include <listappender.h>

Inheritance diagram for Log4Qt::ListAppender:

Log4Qt::AppenderSkeleton Log4Qt::Appender Log4Qt::LogObject

List of all members.

Public Member Functions

 ListAppender (QObject *pParent=0)
virtual ~ListAppender ()
bool configuratorList () const
QList< LoggingEventlist () const
int maxCount () const
void setConfiguratorList (bool isConfiguratorList)
void setMaxCount (int n)
QList< LoggingEventclearList ()
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


Detailed Description

The class ListAppender appends logging events to a list for later processing.

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::ListAppender::ListAppender ( QObject *  pParent = 0  ) 

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


Member Function Documentation

bool Log4Qt::ListAppender::configuratorList (  )  const

Returns true, if the appender is used by a configurator. Otherweise it returns false.

See also:
setConfiguratorList()

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.

See also:
configuratorList(), BasicConfigurator, PropertyConfigurator, ConfiguratorHelper::configureError()

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]

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")

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

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.


Property Documentation

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.

See also:
configuratorList(), setConfiguratorList()

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.

See also:
maxCount(), setMaxCount()


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