-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogging_8h.html
546 lines (483 loc) · 25.1 KB
/
logging_8h.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libusual: usual/logging.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">libusual
 <span id="projectnumber">0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">usual/logging.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Logging framework for unix services.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a5a83202ba8d38f895239f185e52cb8a8">LOG_CONTEXT_DEF</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Example: Prepare dummy context pointer. <a href="#a5a83202ba8d38f895239f185e52cb8a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a942a9ff783407791bb9100710667a551">LOG_CONTEXT</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Example: Reference dummy context pointer. <a href="#a942a9ff783407791bb9100710667a551"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a6ae72553ea9805dd87a463d6f710364d">log_error</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log error message. <a href="#a6ae72553ea9805dd87a463d6f710364d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a5f2c72e6f2dc833f040b39ee7597d944">log_warning</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log warning message. <a href="#a5f2c72e6f2dc833f040b39ee7597d944"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a4d03371f112833576935454ba8fc66a1">log_stats</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log stats (liveness) message. <a href="#a4d03371f112833576935454ba8fc66a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa1cfe5444875c8eca0ea6f6993977d6d">log_info</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log info message. <a href="#aa1cfe5444875c8eca0ea6f6993977d6d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa77e596ef13d2f0f75d0ac9540ed358d">log_debug</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log debug message. <a href="#aa77e596ef13d2f0f75d0ac9540ed358d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a112aabaf01efa7a0915e5d325ef5af70">log_noise</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log debug noise. <a href="#a112aabaf01efa7a0915e5d325ef5af70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#acad519418dbfdd70c1208711e609c80e">fatal</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log and die. <a href="#acad519418dbfdd70c1208711e609c80e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a9158bf82ebd653ac62bb04a9fdc61cc5">fatal_perror</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Log strerror and die. <a href="#a9158bf82ebd653ac62bb04a9fdc61cc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a0b2164ee75646f16a7388a36e6800c35">die</a>(...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Less verbose <a class="el" href="logging_8h.html#acad519418dbfdd70c1208711e609c80e" title="Log and die.">fatal()</a> <a href="#a0b2164ee75646f16a7388a36e6800c35"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a19e9f92cde0bd1975dd4157ad5e580f1">logging_prefix_fn_t</a> )(enum LogLevel lev, void *ctx, char *dst, unsigned int dstlen)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signature for logging_prefix_cb. <a href="#a19e9f92cde0bd1975dd4157ad5e580f1"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a06d8975eae7c150aff0f0c2da1eb317e">reset_logging</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close open logfiles and syslog. <a href="#a06d8975eae7c150aff0f0c2da1eb317e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="logging_8h.html#a19e9f92cde0bd1975dd4157ad5e580f1">logging_prefix_fn_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#afaf4f4ea5f3697cf2d089fc839f6d531">logging_prefix_cb</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Optional global callback for each log line. <a href="#afaf4f4ea5f3697cf2d089fc839f6d531"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a431aeddcd7e1a059ca7c4fb3f0d40f40">cf_verbose</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Global verbosity level. <a href="#a431aeddcd7e1a059ca7c4fb3f0d40f40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a24a80fb054562b1d87e8d76625d3b101">cf_quiet</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Toggle logging to stderr. <a href="#a24a80fb054562b1d87e8d76625d3b101"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ac11b7bf3aaee701de7946e70b5cca3d8">cf_logfile</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Logfile location, default NULL. <a href="#ac11b7bf3aaee701de7946e70b5cca3d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a9b4b9b458b15ce484242bb7d44d1cc3c">cf_syslog</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Syslog on/off. <a href="#a9b4b9b458b15ce484242bb7d44d1cc3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a3ddee6e005e4d8528e775e068d949ce7">cf_syslog_ident</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">ident for syslog, if NULL syslog is disabled (default) <a href="#a3ddee6e005e4d8528e775e068d949ce7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa1a22106bf37c746436ad118767bb629">cf_syslog_facility</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Facility name. <a href="#aa1a22106bf37c746436ad118767bb629"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum LogLevel </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a779eb24a57dd581915968f93639e002c">cf_syslog_level</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Max log level for syslog writer. <a href="#a779eb24a57dd581915968f93639e002c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum LogLevel </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa54bb1022098bd7698c0ca7fe16d1595">cf_logfile_level</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Max log level for logfile writer. <a href="#aa54bb1022098bd7698c0ca7fe16d1595"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum LogLevel </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#acd33d30eb1f22f668027269e22ef2eec">cf_stderr_level</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Max log level for stderr writer. <a href="#acd33d30eb1f22f668027269e22ef2eec"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Logging framework for unix services. </p>
<p>Supported outputs:</p>
<ul>
<li>syslog</li>
<li>log file</li>
<li>stderr</li>
</ul>
<h2><a class="anchor" id="logging_prefix"></a>
Logging context</h2>
<p>It is possible to pass context info to all logging calls and later add details to log lines or to filter based on it.</p>
<p>Each call references 2 macros:</p>
<ul>
<li>LOG_CONTEXT_DEF - which can define/call any variables</li>
<li>LOG_CONTEXT - which should return a pointer variable.</li>
</ul>
<p>Later, global callback function <a class="el" href="logging_8h.html#afaf4f4ea5f3697cf2d089fc839f6d531">logging_prefix_cb</a> will get this pointer with destination buffer and can either add more info for log line or tell to skip logging this message. </p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a5a83202ba8d38f895239f185e52cb8a8"></a><!-- doxytag: member="logging.h::LOG_CONTEXT_DEF" ref="a5a83202ba8d38f895239f185e52cb8a8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a5a83202ba8d38f895239f185e52cb8a8">LOG_CONTEXT_DEF</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Example: Prepare dummy context pointer. </p>
</div>
</div>
<a class="anchor" id="a942a9ff783407791bb9100710667a551"></a><!-- doxytag: member="logging.h::LOG_CONTEXT" ref="a942a9ff783407791bb9100710667a551" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a942a9ff783407791bb9100710667a551">LOG_CONTEXT</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Example: Reference dummy context pointer. </p>
</div>
</div>
<a class="anchor" id="a6ae72553ea9805dd87a463d6f710364d"></a><!-- doxytag: member="logging.h::log_error" ref="a6ae72553ea9805dd87a463d6f710364d" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a6ae72553ea9805dd87a463d6f710364d">log_error</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log error message. </p>
</div>
</div>
<a class="anchor" id="a5f2c72e6f2dc833f040b39ee7597d944"></a><!-- doxytag: member="logging.h::log_warning" ref="a5f2c72e6f2dc833f040b39ee7597d944" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a5f2c72e6f2dc833f040b39ee7597d944">log_warning</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log warning message. </p>
</div>
</div>
<a class="anchor" id="a4d03371f112833576935454ba8fc66a1"></a><!-- doxytag: member="logging.h::log_stats" ref="a4d03371f112833576935454ba8fc66a1" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a4d03371f112833576935454ba8fc66a1">log_stats</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log stats (liveness) message. </p>
</div>
</div>
<a class="anchor" id="aa1cfe5444875c8eca0ea6f6993977d6d"></a><!-- doxytag: member="logging.h::log_info" ref="aa1cfe5444875c8eca0ea6f6993977d6d" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#aa1cfe5444875c8eca0ea6f6993977d6d">log_info</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log info message. </p>
</div>
</div>
<a class="anchor" id="aa77e596ef13d2f0f75d0ac9540ed358d"></a><!-- doxytag: member="logging.h::log_debug" ref="aa77e596ef13d2f0f75d0ac9540ed358d" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#aa77e596ef13d2f0f75d0ac9540ed358d">log_debug</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log debug message. </p>
</div>
</div>
<a class="anchor" id="a112aabaf01efa7a0915e5d325ef5af70"></a><!-- doxytag: member="logging.h::log_noise" ref="a112aabaf01efa7a0915e5d325ef5af70" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a112aabaf01efa7a0915e5d325ef5af70">log_noise</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log debug noise. </p>
</div>
</div>
<a class="anchor" id="acad519418dbfdd70c1208711e609c80e"></a><!-- doxytag: member="logging.h::fatal" ref="acad519418dbfdd70c1208711e609c80e" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#acad519418dbfdd70c1208711e609c80e">fatal</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log and die. </p>
<p>It also logs source location </p>
</div>
</div>
<a class="anchor" id="a9158bf82ebd653ac62bb04a9fdc61cc5"></a><!-- doxytag: member="logging.h::fatal_perror" ref="a9158bf82ebd653ac62bb04a9fdc61cc5" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a9158bf82ebd653ac62bb04a9fdc61cc5">fatal_perror</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log strerror and die. </p>
<p>Error message also includes strerror(errno) </p>
</div>
</div>
<a class="anchor" id="a0b2164ee75646f16a7388a36e6800c35"></a><!-- doxytag: member="logging.h::die" ref="a0b2164ee75646f16a7388a36e6800c35" args="(...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="logging_8h.html#a0b2164ee75646f16a7388a36e6800c35">die</a></td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Less verbose <a class="el" href="logging_8h.html#acad519418dbfdd70c1208711e609c80e" title="Log and die.">fatal()</a> </p>
</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a19e9f92cde0bd1975dd4157ad5e580f1"></a><!-- doxytag: member="logging.h::logging_prefix_fn_t" ref="a19e9f92cde0bd1975dd4157ad5e580f1" args=")(enum LogLevel lev, void *ctx, char *dst, unsigned int dstlen)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int(* <a class="el" href="logging_8h.html#a19e9f92cde0bd1975dd4157ad5e580f1">logging_prefix_fn_t</a>)(enum LogLevel lev, void *ctx, char *dst, unsigned int dstlen)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Signature for logging_prefix_cb. </p>
<p>Return value is either added string length in dst or negative value to skip logging. </p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a06d8975eae7c150aff0f0c2da1eb317e"></a><!-- doxytag: member="logging.h::reset_logging" ref="a06d8975eae7c150aff0f0c2da1eb317e" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="logging_8h.html#a06d8975eae7c150aff0f0c2da1eb317e">reset_logging</a> </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Close open logfiles and syslog. </p>
<p>Useful when rotating log files. </p>
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="afaf4f4ea5f3697cf2d089fc839f6d531"></a><!-- doxytag: member="logging.h::logging_prefix_cb" ref="afaf4f4ea5f3697cf2d089fc839f6d531" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="logging_8h.html#a19e9f92cde0bd1975dd4157ad5e580f1">logging_prefix_fn_t</a> <a class="el" href="logging_8h.html#afaf4f4ea5f3697cf2d089fc839f6d531">logging_prefix_cb</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Optional global callback for each log line. </p>
<p>It can either add info to log message or skip logging it. </p>
</div>
</div>
<a class="anchor" id="a431aeddcd7e1a059ca7c4fb3f0d40f40"></a><!-- doxytag: member="logging.h::cf_verbose" ref="a431aeddcd7e1a059ca7c4fb3f0d40f40" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="logging_8h.html#a431aeddcd7e1a059ca7c4fb3f0d40f40">cf_verbose</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Global verbosity level. </p>
<p>0 - show only info level msgs (default) 1 - show debug msgs (log_debug) 2 - show noise msgs (log_noise) </p>
</div>
</div>
<a class="anchor" id="a24a80fb054562b1d87e8d76625d3b101"></a><!-- doxytag: member="logging.h::cf_quiet" ref="a24a80fb054562b1d87e8d76625d3b101" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="logging_8h.html#a24a80fb054562b1d87e8d76625d3b101">cf_quiet</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Toggle logging to stderr. </p>
<p>Default: 1. daemon.c turns this off if goes to background </p>
</div>
</div>
<a class="anchor" id="ac11b7bf3aaee701de7946e70b5cca3d8"></a><!-- doxytag: member="logging.h::cf_logfile" ref="ac11b7bf3aaee701de7946e70b5cca3d8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="logging_8h.html#ac11b7bf3aaee701de7946e70b5cca3d8">cf_logfile</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Logfile location, default NULL. </p>
</div>
</div>
<a class="anchor" id="a9b4b9b458b15ce484242bb7d44d1cc3c"></a><!-- doxytag: member="logging.h::cf_syslog" ref="a9b4b9b458b15ce484242bb7d44d1cc3c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="logging_8h.html#a9b4b9b458b15ce484242bb7d44d1cc3c">cf_syslog</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Syslog on/off. </p>
</div>
</div>
<a class="anchor" id="a3ddee6e005e4d8528e775e068d949ce7"></a><!-- doxytag: member="logging.h::cf_syslog_ident" ref="a3ddee6e005e4d8528e775e068d949ce7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="logging_8h.html#a3ddee6e005e4d8528e775e068d949ce7">cf_syslog_ident</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>ident for syslog, if NULL syslog is disabled (default) </p>
</div>
</div>
<a class="anchor" id="aa1a22106bf37c746436ad118767bb629"></a><!-- doxytag: member="logging.h::cf_syslog_facility" ref="aa1a22106bf37c746436ad118767bb629" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* <a class="el" href="logging_8h.html#aa1a22106bf37c746436ad118767bb629">cf_syslog_facility</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Facility name. </p>
</div>
</div>
<a class="anchor" id="a779eb24a57dd581915968f93639e002c"></a><!-- doxytag: member="logging.h::cf_syslog_level" ref="a779eb24a57dd581915968f93639e002c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum LogLevel <a class="el" href="logging_8h.html#a779eb24a57dd581915968f93639e002c">cf_syslog_level</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Max log level for syslog writer. </p>
</div>
</div>
<a class="anchor" id="aa54bb1022098bd7698c0ca7fe16d1595"></a><!-- doxytag: member="logging.h::cf_logfile_level" ref="aa54bb1022098bd7698c0ca7fe16d1595" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum LogLevel <a class="el" href="logging_8h.html#aa54bb1022098bd7698c0ca7fe16d1595">cf_logfile_level</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Max log level for logfile writer. </p>
</div>
</div>
<a class="anchor" id="acd33d30eb1f22f668027269e22ef2eec"></a><!-- doxytag: member="logging.h::cf_stderr_level" ref="acd33d30eb1f22f668027269e22ef2eec" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum LogLevel <a class="el" href="logging_8h.html#acd33d30eb1f22f668027269e22ef2eec">cf_stderr_level</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Max log level for stderr writer. </p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>