28 #ifndef _LOG4TANGO_NDC_H
29 #define _LOG4TANGO_NDC_H
31 #ifdef LOG4TANGO_HAS_NDC
93 struct DiagnosticContext {
94 DiagnosticContext(
const std::string& message);
95 DiagnosticContext(
const std::string& message,
96 const DiagnosticContext& parent);
102 typedef std::vector<DiagnosticContext> ContextStack;
112 static void clear (
void);
127 static ContextStack* clone_stack (
void);
133 static const std::string&
get (void);
139 static int get_depth (
void);
141 static void inherit (ContextStack* stack);
152 static std::string pop (
void);
162 static void push (
const std::string& message);
170 static void set_max_depth (
int max_depth);
176 static NDC& get_ndc();
182 virtual void _clear (
void);
183 virtual ContextStack* _clone_stack (
void);
184 virtual const std::string& _get (
void)
const;
185 virtual int _get_depth (
void)
const;
186 virtual void _inherit (ContextStack* stack);
187 virtual std::string _pop (
void);
188 virtual void _push (
const std::string& message);
189 virtual void _set_max_depth (
int max_depth);
196 #endif // LOG4TANGO_HAS_NDC
198 #endif // _LOG4TANGO_NDC_HH