Log4Qt::TTCCLayout Class Reference

The class TTCCLayout outputs the time, thread, logger and nested diagnostic context information of a logging event. More...

#include <ttcclayout.h>

Inheritance diagram for Log4Qt::TTCCLayout:

Log4Qt::Layout Log4Qt::LogObject

List of all members.

Public Types

enum  DateFormat {
  NONE, ISO8601, ABSOLUTE, DATE,
  RELATIVE
}

Public Member Functions

 TTCCLayout (QObject *pParent=0)
 TTCCLayout (const QString &rDateFormat, QObject *pParent=0)
 TTCCLayout (DateFormat dateFormat, QObject *pParent=0)
virtual ~TTCCLayout ()
bool categoryPrefixing () const
bool contextPrinting () const
QString dateFormat () const
bool threadPrinting () const
void setCategoryPrefixing (bool categoryPrefixing)
void setContextPrinting (bool contextPrinting)
void setDateFormat (const QString &rDateFormat)
void setDateFormat (DateFormat dateFormat)
void setThreadPrinting (bool threadPrinting)
virtual QString format (const LoggingEvent &rEvent)

Protected Member Functions

virtual QDebug debug (QDebug &rDebug) const

Properties

bool categoryPrefixing
bool contextPrinting
QString dateFormat
bool threadPrinting


Detailed Description

The class TTCCLayout outputs the time, thread, logger and nested diagnostic context information of a logging event.

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

Member Enumeration Documentation

The enum DateFormat defines constants for date formats.

See also:
setDateFormat(DateFormat), DateTime::toString()
Enumerator:
NONE  The none date format string is "NONE".
ISO8601  The iso8601 date format string is "ISO8601". The date will be formatted as yyyy-MM-dd hh:mm:ss.zzz.
ABSOLUTE  The absolute date format string is "ABSOLUTE". The date will be formatted as HH:mm:ss.zzz.
DATE  The date date format string is "DATE". The date will be formatted as MMM YYYY HH:mm:ss.zzzz.
RELATIVE  The relative date format string is "RELATIVE". The date will be formatted as milliseconds since start of the program.


Constructor & Destructor Documentation

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

Log4Qt::TTCCLayout::TTCCLayout ( const QString &  rDateFormat,
QObject *  pParent = 0 
)

Log4Qt::TTCCLayout::TTCCLayout ( DateFormat  dateFormat,
QObject *  pParent = 0 
)

Creates a TTCCLayout with the date formar value specified by the dateFormat constant and the parent pParent.

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


Member Function Documentation

bool Log4Qt::TTCCLayout::categoryPrefixing (  )  const

bool Log4Qt::TTCCLayout::contextPrinting (  )  const

QString Log4Qt::TTCCLayout::dateFormat (  )  const

bool Log4Qt::TTCCLayout::threadPrinting (  )  const

void Log4Qt::TTCCLayout::setCategoryPrefixing ( bool  categoryPrefixing  )  [inline]

void Log4Qt::TTCCLayout::setContextPrinting ( bool  contextPrinting  )  [inline]

void Log4Qt::TTCCLayout::setDateFormat ( const QString &  rDateFormat  )  [inline]

void Log4Qt::TTCCLayout::setDateFormat ( DateFormat  dateFormat  ) 

Sets the date format to the value specified by the dateFormat constant.

void Log4Qt::TTCCLayout::setThreadPrinting ( bool  threadPrinting  )  [inline]

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

Implements Log4Qt::Layout.

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

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

TTCCLayout(name:"TTCC" categoryprefixing:true contextprinting:true dateformat:"ISO8601" referencecount:1 threadprinting:true)

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

Implements Log4Qt::LogObject.


Property Documentation

bool Log4Qt::TTCCLayout::categoryPrefixing [inline, read, write]

The property holds if the logger name is part of the formatted output.

The default value is true for including the logger name.

See also:
categoryPrefixing(), setCategoryPrefixing()

bool Log4Qt::TTCCLayout::contextPrinting [inline, read, write]

The property holds if the nested context information is part of the formatted output.

The default value it true for including the nested context information.

See also:
contextPrinting(), setContextPrinting()

QString Log4Qt::TTCCLayout::dateFormat [inline, read, write]

The property holds the date format used by the layout.

The default date format is "RELATIVE".

See also:
dateFormat(), setDateFormat()

bool Log4Qt::TTCCLayout::threadPrinting [inline, read, write]

The property holds if the thread name is part of the formatted output.

The default value it true for including the thread name.

See also:
threadPrinting(), setThreadPrinting()


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