Log4Qt::MDC Class Reference

The class MDC implements a mapped diagnostic context. More...

#include <mdc.h>

List of all members.

Static Public Member Functions

static QString get (const QString &rKey)
static QHash< QString, QString > context ()
static MDCinstance ()
static void put (const QString &rKey, const QString &rValue)
static void remove (const QString &rKey)

Related Functions

(Note that these are not member functions.)

QDebug operator<< (QDebug debug, const MDC &rMDC)


Detailed Description

The class MDC implements a mapped diagnostic context.

Note:
All the functions declared in this class are thread-safe.

Member Function Documentation

static QString Log4Qt::MDC::get ( const QString &  rKey  )  [static]

static QHash<QString, QString> Log4Qt::MDC::context (  )  [static]

static MDC* Log4Qt::MDC::instance (  )  [static]

Returns the MDC instance.

void Log4Qt::MDC::put ( const QString &  rKey,
const QString &  rValue 
) [inline, static]

void Log4Qt::MDC::remove ( const QString &  rKey  )  [inline, static]


Friends And Related Function Documentation

QDebug operator<< ( QDebug  debug,
const MDC rMDC 
) [related]

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

MDC(thread:"main" context:QHash(("login", "Peter")("database", "UAT")) )

See also:
QDebug


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