File: classlog4cpp_1_1NDC.html

package info (click to toggle)
log4cpp-doc 1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,528 kB
  • sloc: makefile: 10
file content (558 lines) | stat: -rw-r--r-- 29,454 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>log4cpp: log4cpp::NDC Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<div class="nav">
<a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1NDC.html">NDC</a></div>
<h1>log4cpp::NDC Class Reference</h1><!-- doxytag: class="log4cpp::NDC" -->The <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> class implements <em>nested diagnostic contexts</em> as defined by Neil Harrison in the article "Patterns for Logging Diagnostic Messages" part of the book "<em>Pattern Languages of Program Design 3</em>" edited by Martin et al.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="NDC_8hh-source.html">NDC.hh</a>&gt;</code>
<p>
<a href="classlog4cpp_1_1NDC-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector&lt; <a class="el" href="structlog4cpp_1_1NDC_1_1DiagnosticContext.html">DiagnosticContext</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a></td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#52f957aadc13895525e83868df67d135">NDC</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#f36717d0f779e7b245b2bf92f8654de9">~NDC</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#6b6996557e556df29623fd14ac6661b0">_clear</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#3bc4401426802baead3ae93f6760f10e">_cloneStack</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#f60e8d194fa537541c45740cc4512cc4">_get</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#7c216441a77066fc59d36ffd07dd8f0e">_getDepth</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#dc72c5bcb57815f5ceafe1c6ee40465f">_inherit</a> (<a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *stack)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#4af8a96d401edf56d57d1f3d780ac321">_pop</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#ed936d87ab91ef44fe463406a009f05c">_push</a> (const std::string &amp;message)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#9ec662bf36a7509304c77bd97ee58bcb">_setMaxDepth</a> (int maxDepth)</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#b0d6de25209c63a51889eba89dd6181d">clear</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear any nested disgnostic information if any.  <a href="#b0d6de25209c63a51889eba89dd6181d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#f1c32f92de0b64e67af2dd568310279f">cloneStack</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone the diagnostic context for the current thread.  <a href="#f1c32f92de0b64e67af2dd568310279f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#62a7cb56ef73bde377b2a9963bb86661">get</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current diagnostic context string.  <a href="#62a7cb56ef73bde377b2a9963bb86661"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#6142056be34a16e121d0b9b1bf986e7e">getDepth</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current nesting depth of this diagnostic context.  <a href="#6142056be34a16e121d0b9b1bf986e7e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#f03f56251d0fd18a7b539b957a6cdacd">inherit</a> (<a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *stack)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#4c0720efccfc299a49801f7a35352f77">pop</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clients should call this method before leaving a diagnostic context.  <a href="#4c0720efccfc299a49801f7a35352f77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#d4f07aa423a2855ce00f6d7642ec86be">push</a> (const std::string &amp;message)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push new diagnostic context information for the current thread.  <a href="#d4f07aa423a2855ce00f6d7642ec86be"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#60cc6e40fb64bfb8f086878584ef78e6">setMaxDepth</a> (int maxDepth)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the maximum nesting depth for the current <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a>.  <a href="#60cc6e40fb64bfb8f086878584ef78e6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classlog4cpp_1_1NDC.html">NDC</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#81679eb19f8eb74a73ffec884bd2eb77">getNDC</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> for the current thread.  <a href="#81679eb19f8eb74a73ffec884bd2eb77"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1NDC.html#1f9df91c6a43669c80d6c053b1fab6c8">_stack</a></td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlog4cpp_1_1NDC_1_1DiagnosticContext.html">DiagnosticContext</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> class implements <em>nested diagnostic contexts</em> as defined by Neil Harrison in the article "Patterns for Logging Diagnostic Messages" part of the book "<em>Pattern Languages of Program Design 3</em>" edited by Martin et al. 
<p>
A Nested Diagnostic Context, or <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> in short, is an instrument to distinguish interleaved log output from different sources. Log output is typically interleaved when a server handles multiple clients near-simulatanously.<p>
Interleaved log output can still be meaningful if each log entry from different contexts had a distinctive stamp. This is where NDCs come into play.<p>
<em><b>Note that NDCs are managed on a per thread basis</b></em>. <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> operations such as <code>push</code>, <code> pop</code>, <code>clear</code>, <code>getDepth</code> and <code> setMaxDepth</code> affect the <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> of the <em>current</em> thread only. NDCs of other threads remain unaffected.<p>
To build an <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> one uses the <code>push</code> operation. Simply put,<p>
<ul>
<li>
Contexts can be nested.<p>
<p>
</li>
<li>
When entering a context, call <code><a class="el" href="classlog4cpp_1_1NDC.html#d4f07aa423a2855ce00f6d7642ec86be" title="Push new diagnostic context information for the current thread.">NDC.push</a></code>. As a side effect, if there is no nested diagnostic context for the current thread, this method will create it.<p>
<p>
</li>
<li>
When leaving a context, call <code><a class="el" href="classlog4cpp_1_1NDC.html#4c0720efccfc299a49801f7a35352f77" title="Clients should call this method before leaving a diagnostic context.">NDC.pop</a></code>. </li>
</ul>
<p>
There is no penalty for forgetting to match each <code>push</code> operation with a corresponding <code>pop</code>, except the obvious mismatch between the real application context and the context set in the <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a>.<p>
Custom Layouts may include the nested diagnostic context for the current thread in log messages, without any user intervention. Hence, even if a server is serving multiple clients simultaneously, the logs emanating from the same code (belonging to the same category) can still be distinguished because each client request will have a different <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> tag.<p>
<em>Unfortunately, unlike Java, C++ does not have platform independent multithreading support. Therefore, currently <a class="el" href="namespacelog4cpp.html" title="The top level namespace for all 'Log for C++' types and classes.">log4cpp</a> is not multithread aware, it implicitly assumes only one thread exists, the main process thread. </em> 
<p>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="ea4fa13814448adfa837884422360775"></a><!-- doxytag: member="log4cpp::NDC::ContextStack" ref="ea4fa13814448adfa837884422360775" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;<a class="el" href="structlog4cpp_1_1NDC_1_1DiagnosticContext.html">DiagnosticContext</a>&gt; <a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">log4cpp::NDC::ContextStack</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="52f957aadc13895525e83868df67d135"></a><!-- doxytag: member="log4cpp::NDC::NDC" ref="52f957aadc13895525e83868df67d135" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::NDC::NDC           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="f36717d0f779e7b245b2bf92f8654de9"></a><!-- doxytag: member="log4cpp::NDC::~NDC" ref="f36717d0f779e7b245b2bf92f8654de9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">log4cpp::NDC::~NDC           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b0d6de25209c63a51889eba89dd6181d"></a><!-- doxytag: member="log4cpp::NDC::clear" ref="b0d6de25209c63a51889eba89dd6181d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::clear           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clear any nested disgnostic information if any. 
<p>
This method is useful in cases where the same thread can be potentially used over and over in different unrelated contexts.<p>
This method is equivalent to calling the <code>setMaxDepth</code> method with a zero <code>maxDepth</code> argument. 
</div>
</div><p>
<a class="anchor" name="f1c32f92de0b64e67af2dd568310279f"></a><!-- doxytag: member="log4cpp::NDC::cloneStack" ref="f1c32f92de0b64e67af2dd568310279f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">NDC::ContextStack</a> * log4cpp::NDC::cloneStack           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clone the diagnostic context for the current thread. 
<p>
Internally a diagnostic context is represented as a stack. A given thread can supply the stack (i.e. diagnostic context) to a child thread so that the child can inherit the parent thread's diagnostic context.<p>
The child thread uses the <code>inherit</code> method to inherit the parent's diagnostic context.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Stack A clone of the current thread's diagnostic context. </dd></dl>

</div>
</div><p>
<a class="anchor" name="62a7cb56ef73bde377b2a9963bb86661"></a><!-- doxytag: member="log4cpp::NDC::get" ref="62a7cb56ef73bde377b2a9963bb86661" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; log4cpp::NDC::get           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current diagnostic context string. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the context string. </dd></dl>

</div>
</div><p>
<a class="anchor" name="6142056be34a16e121d0b9b1bf986e7e"></a><!-- doxytag: member="log4cpp::NDC::getDepth" ref="6142056be34a16e121d0b9b1bf986e7e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t log4cpp::NDC::getDepth           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the current nesting depth of this diagnostic context. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the nesting depth </dd></dl>

</div>
</div><p>
<a class="anchor" name="f03f56251d0fd18a7b539b957a6cdacd"></a><!-- doxytag: member="log4cpp::NDC::inherit" ref="f03f56251d0fd18a7b539b957a6cdacd" args="(ContextStack *stack)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::inherit           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *&nbsp;</td>
          <td class="paramname"> <em>stack</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="4c0720efccfc299a49801f7a35352f77"></a><!-- doxytag: member="log4cpp::NDC::pop" ref="4c0720efccfc299a49801f7a35352f77" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string log4cpp::NDC::pop           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clients should call this method before leaving a diagnostic context. 
<p>
The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>String The innermost diagnostic context. </dd></dl>

</div>
</div><p>
<a class="anchor" name="d4f07aa423a2855ce00f6d7642ec86be"></a><!-- doxytag: member="log4cpp::NDC::push" ref="d4f07aa423a2855ce00f6d7642ec86be" args="(const std::string &amp;message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::push           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>message</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Push new diagnostic context information for the current thread. 
<p>
The contents of the <code>message</code> parameter is determined solely by the client.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>The new diagnostic context information. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="60cc6e40fb64bfb8f086878584ef78e6"></a><!-- doxytag: member="log4cpp::NDC::setMaxDepth" ref="60cc6e40fb64bfb8f086878584ef78e6" args="(int maxDepth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::setMaxDepth           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>maxDepth</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the maximum nesting depth for the current <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a>. 
<p>
Curently NDCs do not enforce a maximum depth and consequentially this method has no effect. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>maxDepth</em>&nbsp;</td><td>the maximum nesting depth </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="81679eb19f8eb74a73ffec884bd2eb77"></a><!-- doxytag: member="log4cpp::NDC::getNDC" ref="81679eb19f8eb74a73ffec884bd2eb77" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1NDC.html">NDC</a> &amp; log4cpp::NDC::getNDC           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> for the current thread. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the <a class="el" href="classlog4cpp_1_1NDC.html" title="The NDC class implements nested diagnostic contexts as defined by Neil Harrison in...">NDC</a> for the current thread </dd></dl>

</div>
</div><p>
<a class="anchor" name="6b6996557e556df29623fd14ac6661b0"></a><!-- doxytag: member="log4cpp::NDC::_clear" ref="6b6996557e556df29623fd14ac6661b0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::_clear           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="3bc4401426802baead3ae93f6760f10e"></a><!-- doxytag: member="log4cpp::NDC::_cloneStack" ref="3bc4401426802baead3ae93f6760f10e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">NDC::ContextStack</a> * log4cpp::NDC::_cloneStack           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="f60e8d194fa537541c45740cc4512cc4"></a><!-- doxytag: member="log4cpp::NDC::_get" ref="f60e8d194fa537541c45740cc4512cc4" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; log4cpp::NDC::_get           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="7c216441a77066fc59d36ffd07dd8f0e"></a><!-- doxytag: member="log4cpp::NDC::_getDepth" ref="7c216441a77066fc59d36ffd07dd8f0e" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t log4cpp::NDC::_getDepth           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="dc72c5bcb57815f5ceafe1c6ee40465f"></a><!-- doxytag: member="log4cpp::NDC::_inherit" ref="dc72c5bcb57815f5ceafe1c6ee40465f" args="(ContextStack *stack)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::_inherit           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> *&nbsp;</td>
          <td class="paramname"> <em>stack</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="4af8a96d401edf56d57d1f3d780ac321"></a><!-- doxytag: member="log4cpp::NDC::_pop" ref="4af8a96d401edf56d57d1f3d780ac321" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string log4cpp::NDC::_pop           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="ed936d87ab91ef44fe463406a009f05c"></a><!-- doxytag: member="log4cpp::NDC::_push" ref="ed936d87ab91ef44fe463406a009f05c" args="(const std::string &amp;message)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::_push           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>message</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="9ec662bf36a7509304c77bd97ee58bcb"></a><!-- doxytag: member="log4cpp::NDC::_setMaxDepth" ref="9ec662bf36a7509304c77bd97ee58bcb" args="(int maxDepth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log4cpp::NDC::_setMaxDepth           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>maxDepth</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="1f9df91c6a43669c80d6c053b1fab6c8"></a><!-- doxytag: member="log4cpp::NDC::_stack" ref="1f9df91c6a43669c80d6c053b1fab6c8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cpp_1_1NDC.html#ea4fa13814448adfa837884422360775">ContextStack</a> <a class="el" href="classlog4cpp_1_1NDC.html#1f9df91c6a43669c80d6c053b1fab6c8">log4cpp::NDC::_stack</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="NDC_8hh-source.html">NDC.hh</a><li><a class="el" href="NDC_8cpp.html">NDC.cpp</a></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 3 11:55:05 2007 for log4cpp by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>