l4snd::MDC Class Reference

MDC class. More...

List of all members.

Public Types

typedef std::pair
< std::string,
std::string > 
Pair
 Helper definition for a name/value relation.

Public Member Functions

void add (const std::string &name, const std::string &value)
 Append new MDC.
void remove (const std::string &name)
 Remove a MDC.
std::vector< Pairget () const
 Gets all stored MDCs.
unsigned numMDCs () const
 Gets the number of stored MDCs.
void clear ()
 Clears all stored MDCs.
virtual ~MDC ()
 Provide virtual destructor.


Detailed Description

MDC class.

It provides mapped diagnostic contexts. A Mapped Diagnostic Context, or MDC in short, is an instrument for distinguishing interleaved log output from different sources. Log output is typically interleaved when a server handles multiple clients near-simultaneously.

Definition at line 47 of file mdc.h.


Member Function Documentation

void l4snd::MDC::add ( const std::string &  name,
const std::string &  value 
)

Append new MDC.

Parameters:
name MDC name
value MDC value

Definition at line 45 of file mdc.cpp.

void l4snd::MDC::remove ( const std::string &  name  ) 

Remove a MDC.

Parameters:
name MDC name

Definition at line 52 of file mdc.cpp.

std::vector< MDC::Pair > l4snd::MDC::get (  )  const

Gets all stored MDCs.

Returns:
name/value pairs

Definition at line 66 of file mdc.cpp.

unsigned l4snd::MDC::numMDCs (  )  const

Gets the number of stored MDCs.

Returns:
number of MDCs

Definition at line 60 of file mdc.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Nov 24 14:41:25 2007 for log4sendpp by  doxygen 1.5.3