# log4cplus::NDCContextCreator Class Reference

This class ensures that a NDC#push call is always matched with a NDC#pop call even in the face of exceptions. More...

`#include <ndc.h>`

List of all members.

## Public Member Functions

| NDCContextCreator (const log4cplus::tstring &msg)
| Pushes `msg` onto the NDC stack.
| ~NDCContextCreator ()
| Pops the NDC stack.

## Detailed Description

This class ensures that a NDC#push call is always matched with a NDC#pop call even in the face of exceptions.

Definition at line 282 of file ndc.h.

## Constructor & Destructor Documentation

log4cplus::NDCContextCreator::NDCContextCreator | ( | const log4cplus::tstring & | msg | ) | `[inline]`

| Pushes `msg` onto the NDC stack. Definition at line 285 of file ndc.h. References log4cplus::getNDC(), and log4cplus::NDC::push().

log4cplus::NDCContextCreator::~NDCContextCreator | ( |  | ) | `[inline]`

| Pops the NDC stack. Definition at line 288 of file ndc.h. References log4cplus::getNDC(), and log4cplus::NDC::pop().

The documentation for this class was generated from the following file:

- ndc.h