Log4Qt::PatternLayout Class Reference

The class PatternLayout outputs a logging event based on a pattern string. More...

#include <patternlayout.h>

Inheritance diagram for Log4Qt::PatternLayout:

Log4Qt::Layout Log4Qt::LogObject

List of all members.

Public Types

enum  ConversionPattern { DEFAULT_CONVERSION_PATTERN, TTCC_CONVERSION_PATTERN }

Public Member Functions

 PatternLayout (QObject *pParent=0)
 PatternLayout (const QString &rPattern, QObject *pParent=0)
 PatternLayout (ConversionPattern conversionPattern, QObject *pParent=0)
virtual ~PatternLayout ()
QString conversionPattern () const
void setConversionPattern (const QString &rPattern)
void setConversionPattern (ConversionPattern conversionPattern)
virtual QString format (const LoggingEvent &rEvent)

Protected Member Functions

virtual QDebug debug (QDebug &rDebug) const

Properties

QString conversionPattern


Detailed Description

The class PatternLayout outputs a logging event based on a pattern string.

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

Member Enumeration Documentation

The enum ConversionPattern defines constants for pattern strings.

See also:
setConversionPattern(ConversionPattern);
Enumerator:
DEFAULT_CONVERSION_PATTERN  The default conversion pattern string is "%m,%n".
TTCC_CONVERSION_PATTERN  The ttcc conversion pattern string is "%r [%t] %p %c %x - %m%n".


Constructor & Destructor Documentation

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

Log4Qt::PatternLayout::PatternLayout ( const QString &  rPattern,
QObject *  pParent = 0 
)

Log4Qt::PatternLayout::PatternLayout ( ConversionPattern  conversionPattern,
QObject *  pParent = 0 
)

Creates a PatternLayout with the conversion pattern value specified by the conversionPattern constant.

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


Member Function Documentation

QString Log4Qt::PatternLayout::conversionPattern (  )  const

void Log4Qt::PatternLayout::setConversionPattern ( const QString &  rPattern  )  [inline]

void Log4Qt::PatternLayout::setConversionPattern ( ConversionPattern  conversionPattern  ) 

Sets the conversion pattern to the value specified by the conversionPattern constant.

virtual QString Log4Qt::PatternLayout::format ( const LoggingEvent rEvent  )  [virtual]

Implements Log4Qt::Layout.

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

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

PatternLayout(name:"PL" pattern:"%r [%t] %p %c %x - %m%n" "referencecount:3")

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

Implements Log4Qt::LogObject.


Property Documentation

QString Log4Qt::PatternLayout::conversionPattern [inline, read, write]

The property holds the conversion pattern used by the appender.

The default is "%m%n".

See also:
conversionPattern(), setConversionPattern()


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