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 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821
|
<!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>C Standard Library Extensions: Message Logging</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">C Standard Library Extensions
 <span id="projectnumber">1.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.0 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Message Logging</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2b9a9a900fb2463559b5672d23eae621"><td class="memItemLeft" align="right" valign="top">cx_log_level_flags </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga2b9a9a900fb2463559b5672d23eae621">cx_log_set_always_fatal</a> (cx_log_level_flags mask)</td></tr>
<tr class="memdesc:ga2b9a9a900fb2463559b5672d23eae621"><td class="mdescLeft"> </td><td class="mdescRight">Set log levels to be always fatal. <a href="#ga2b9a9a900fb2463559b5672d23eae621"></a><br/></td></tr>
<tr class="memitem:ga59b256cd59854cd96a66fecf500b6ec3"><td class="memItemLeft" align="right" valign="top">cxsize </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga59b256cd59854cd96a66fecf500b6ec3">cx_log_get_domain_count</a> (void)</td></tr>
<tr class="memdesc:ga59b256cd59854cd96a66fecf500b6ec3"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of registered log domains. <a href="#ga59b256cd59854cd96a66fecf500b6ec3"></a><br/></td></tr>
<tr class="memitem:ga31594ba8e069190d4f708d9f50362d11"><td class="memItemLeft" align="right" valign="top">const cxchar * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga31594ba8e069190d4f708d9f50362d11">cx_log_get_domain_name</a> (cxsize position)</td></tr>
<tr class="memdesc:ga31594ba8e069190d4f708d9f50362d11"><td class="mdescLeft"> </td><td class="mdescRight">Get the name of a log domain. <a href="#ga31594ba8e069190d4f708d9f50362d11"></a><br/></td></tr>
<tr class="memitem:ga64524feb88742a755fb49d2e2024618e"><td class="memItemLeft" align="right" valign="top">cx_log_level_flags </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga64524feb88742a755fb49d2e2024618e">cx_log_set_fatal_mask</a> (const cxchar *name, cx_log_level_flags fatal_mask)</td></tr>
<tr class="memdesc:ga64524feb88742a755fb49d2e2024618e"><td class="mdescLeft"> </td><td class="mdescRight">Sets the log message level which are fatal for a given domain. <a href="#ga64524feb88742a755fb49d2e2024618e"></a><br/></td></tr>
<tr class="memitem:gac7d6d283da2defe86ee32592b357d299"><td class="memItemLeft" align="right" valign="top">cx_log_func </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gac7d6d283da2defe86ee32592b357d299">cx_log_set_default_handler</a> (cx_log_func func)</td></tr>
<tr class="memdesc:gac7d6d283da2defe86ee32592b357d299"><td class="mdescLeft"> </td><td class="mdescRight">Set the default log handler. <a href="#gac7d6d283da2defe86ee32592b357d299"></a><br/></td></tr>
<tr class="memitem:gaa41ee3d085b05e65dacc48c437380e2b"><td class="memItemLeft" align="right" valign="top">cxuint </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gaa41ee3d085b05e65dacc48c437380e2b">cx_log_set_handler</a> (const cxchar *name, cx_log_level_flags levels, cx_log_func func, cxptr data)</td></tr>
<tr class="memdesc:gaa41ee3d085b05e65dacc48c437380e2b"><td class="mdescLeft"> </td><td class="mdescRight">Set the log handler for a log domain. <a href="#gaa41ee3d085b05e65dacc48c437380e2b"></a><br/></td></tr>
<tr class="memitem:ga285fc56885fcb786d62dc7bc94119949"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga285fc56885fcb786d62dc7bc94119949">cx_log_remove_handler</a> (const cxchar *name, cxuint id)</td></tr>
<tr class="memdesc:ga285fc56885fcb786d62dc7bc94119949"><td class="mdescLeft"> </td><td class="mdescRight">Remove a log handler from a domain. <a href="#ga285fc56885fcb786d62dc7bc94119949"></a><br/></td></tr>
<tr class="memitem:ga7da0d562d30cfcf37a25c1e3af1dfb3b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv</a> (const cxchar *name, cx_log_level_flags level, const cxchar *format, va_list args)</td></tr>
<tr class="memdesc:ga7da0d562d30cfcf37a25c1e3af1dfb3b"><td class="mdescLeft"> </td><td class="mdescRight">Log a formatted message using a variable-length argument. <a href="#ga7da0d562d30cfcf37a25c1e3af1dfb3b"></a><br/></td></tr>
<tr class="memitem:ga81586bd99c04f4a8e7cc5a2d55e74573"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573">cx_log</a> (const cxchar *name, cx_log_level_flags level, const cxchar *format,...)</td></tr>
<tr class="memdesc:ga81586bd99c04f4a8e7cc5a2d55e74573"><td class="mdescLeft"> </td><td class="mdescRight">Log a formatted message. <a href="#ga81586bd99c04f4a8e7cc5a2d55e74573"></a><br/></td></tr>
<tr class="memitem:ga8ea714e9460b6f7ad71bd2083e223a5f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler</a> (const cxchar *name, cx_log_level_flags level, const cxchar *message, cxptr data)</td></tr>
<tr class="memdesc:ga8ea714e9460b6f7ad71bd2083e223a5f"><td class="mdescLeft"> </td><td class="mdescRight">Default log handler. <a href="#ga8ea714e9460b6f7ad71bd2083e223a5f"></a><br/></td></tr>
<tr class="memitem:gaa597310debec2efd1fcc90cbe2bb9737"><td class="memItemLeft" align="right" valign="top">cx_print_func </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gaa597310debec2efd1fcc90cbe2bb9737">cx_print_set_handler</a> (cx_print_func func)</td></tr>
<tr class="memdesc:gaa597310debec2efd1fcc90cbe2bb9737"><td class="mdescLeft"> </td><td class="mdescRight">Set handler for message output. <a href="#gaa597310debec2efd1fcc90cbe2bb9737"></a><br/></td></tr>
<tr class="memitem:ga61bf6d7fbd22c7eaabc33028aae024f7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7">cx_print</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:ga61bf6d7fbd22c7eaabc33028aae024f7"><td class="mdescLeft"> </td><td class="mdescRight">Output a formatted message via the print handler. <a href="#ga61bf6d7fbd22c7eaabc33028aae024f7"></a><br/></td></tr>
<tr class="memitem:gabab9205d88eccc39c650af1b5df3c0ca"><td class="memItemLeft" align="right" valign="top">cx_print_func </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gabab9205d88eccc39c650af1b5df3c0ca">cx_printerr_set_handler</a> (cx_print_func func)</td></tr>
<tr class="memdesc:gabab9205d88eccc39c650af1b5df3c0ca"><td class="mdescLeft"> </td><td class="mdescRight">Set handler for error message output. <a href="#gabab9205d88eccc39c650af1b5df3c0ca"></a><br/></td></tr>
<tr class="memitem:gadce1cff77bbf105e15da2c3fc1c9caec"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gadce1cff77bbf105e15da2c3fc1c9caec">cx_printerr</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:gadce1cff77bbf105e15da2c3fc1c9caec"><td class="mdescLeft"> </td><td class="mdescRight">Output a formatted message via the error message handler. <a href="#gadce1cff77bbf105e15da2c3fc1c9caec"></a><br/></td></tr>
<tr class="memitem:gad86cd013f05c08f9dd3b749dcd940377"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gad86cd013f05c08f9dd3b749dcd940377">cx_error</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:gad86cd013f05c08f9dd3b749dcd940377"><td class="mdescLeft"> </td><td class="mdescRight">Log an error message. <a href="#gad86cd013f05c08f9dd3b749dcd940377"></a><br/></td></tr>
<tr class="memitem:gae1eb53dfd889fdf06f03414292e642b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3">cx_critical</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:gae1eb53dfd889fdf06f03414292e642b3"><td class="mdescLeft"> </td><td class="mdescRight">Log a "critical" warning. <a href="#gae1eb53dfd889fdf06f03414292e642b3"></a><br/></td></tr>
<tr class="memitem:ga71f3ac7c5d9726daeba0826a260fb2d3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3">cx_warning</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:ga71f3ac7c5d9726daeba0826a260fb2d3"><td class="mdescLeft"> </td><td class="mdescRight">Log a warning. <a href="#ga71f3ac7c5d9726daeba0826a260fb2d3"></a><br/></td></tr>
<tr class="memitem:ga08bec22decc20784b11901f65e4c77dc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxmessages.html#ga08bec22decc20784b11901f65e4c77dc">cx_message</a> (const cxchar *format,...)</td></tr>
<tr class="memdesc:ga08bec22decc20784b11901f65e4c77dc"><td class="mdescLeft"> </td><td class="mdescRight">Log a normal message. <a href="#ga08bec22decc20784b11901f65e4c77dc"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>The module implements a flexible logging facility. It can be customized to fit into the application environment. Log levels and functions can be defined and used in addition to or as replacement of the built in levels and log functions.</p>
<dl class="section user"><dt>Synopsis:</b></dt><dd><div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <cxmessages.h></span>
</pre></div> </dd></dl>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gae1eb53dfd889fdf06f03414292e642b3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3">cx_critical</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log a "critical" warning. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">...</td><td>Arguments to be inserted into the format string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This is a convenience function to log a message with level <code>CX_LOG_LEVEL_CRITICAL</code>, as specified by the format string <em>format</em> and the following list of arguments, via the installed log handler.</p>
<p>It is up to the application to decide which warnings are critical and which are not. To cause a termination of the application on critical warnings you may call <b><a class="el" href="group__cxmessages.html#ga2b9a9a900fb2463559b5672d23eae621" title="Set log levels to be always fatal.">cx_log_set_always_fatal()</a></b>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3" title="Log a warning.">cx_warning()</a> </dd></dl>
<p>References <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv()</a>.</p>
</div>
</div>
<a class="anchor" id="gad86cd013f05c08f9dd3b749dcd940377"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#gad86cd013f05c08f9dd3b749dcd940377">cx_error</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log an error message. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">...</td><td>Arguments to be inserted into the format string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This is a convenience function to log an error message specified by the format string <em>format</em> and the following list of arguments via the installed log handler.</p>
<p>Error messages are always considered fatal, i.e. the application is immediately terminated by a call to <b>abort()</b> causing a core dump. Do not use this function for expected (recoverable) errors. This function should be used to indicate a bug (assertion failure) in the application.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3" title="Log a "critical" warning.">cx_critical()</a> </dd></dl>
<p>References <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmemory.html#gad6e24975b7161a4d3f5fe49fd84df740">cx_calloc()</a>, <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>, <a class="el" href="group__cxmemory.html#ga0bc6a6f776bf144d1e5305e447da3631">cx_malloc_clear()</a>, and <a class="el" href="group__cxmemory.html#ga9bba647812fb989479d1cb2291ae3bdf">cx_realloc()</a>.</p>
</div>
</div>
<a class="anchor" id="ga81586bd99c04f4a8e7cc5a2d55e74573"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573">cx_log</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>level</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log a formatted message. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the log domain. </td></tr>
<tr><td class="paramname">level</td><td>The message log level. </td></tr>
<tr><td class="paramname">format</td><td>Format string defining output converstions. </td></tr>
<tr><td class="paramname">...</td><td>Argument list.</td></tr>
</table>
</dd>
</dl>
<p>The log message, as defined by the format string <em>format</em> and the corresponding argument list is logged with the level <em>level</em>, if it is enabled, using the log function set for the log domain <em>name</em>. given by the variable-length argument is formatted according to the All standard <b>printf()</b> conversion directives are supported. </p>
<p>References <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv()</a>.</p>
</div>
</div>
<a class="anchor" id="ga8ea714e9460b6f7ad71bd2083e223a5f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga8ea714e9460b6f7ad71bd2083e223a5f">cx_log_default_handler</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>level</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>message</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxptr </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default log handler. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The message's log domain name </td></tr>
<tr><td class="paramname">level</td><td>Log level of the message </td></tr>
<tr><td class="paramname">message</td><td>The message text </td></tr>
<tr><td class="paramname">data</td><td>Extra data passed by the caller (ignored!)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>The default log handler, which is used if no log handler has been set by a call to <b><a class="el" href="group__cxmessages.html#gaa41ee3d085b05e65dacc48c437380e2b" title="Set the log handler for a log domain.">cx_log_set_handler()</a></b> for the combination domain <em>name</em> and log level <em>level</em>. The message text <em>message</em> is written to <code>stdout</code>, or <code>stderr</code> if the level is one of <code>CX_LOG_LEVEL_ERROR</code>, <code>CX_LOG_LEVEL_CRITICAL</code> and <code>CX_LOG_LEVEL_WARNING</code>. In addition, if the log level is fatal the program is aborted by a call to <b>abort()</b>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gaa41ee3d085b05e65dacc48c437380e2b" title="Set the log handler for a log domain.">cx_log_set_handler()</a> </dd></dl>
<p>References <a class="el" href="group__cxutils.html#ga2e3010cb1f5f44e0e064c798aebc4bbb">cx_program_get_name()</a>, <a class="el" href="group__cxstring.html#ga5488378ca5476e1402fa9ac880c5c2e6">cx_string_append()</a>, <a class="el" href="group__cxstring.html#ga7c9522f40844cecd8aa31a537d594a73">cx_string_delete()</a>, <a class="el" href="group__cxstring.html#ga90d4fbf5e229be5dcbd05a83c4fa547a">cx_string_get()</a>, <a class="el" href="group__cxstring.html#ga2677bfd02e0324dcaf6a16146cc5d613">cx_string_new()</a>, <a class="el" href="group__cxstring.html#ga5255beabea7b5da62d4d2bf7bf6a27ad">cx_string_prepend()</a>, and <a class="el" href="group__cxstring.html#ga29362244440619a3d7090259c7549585">cx_string_sprintf()</a>.</p>
</div>
</div>
<a class="anchor" id="ga59b256cd59854cd96a66fecf500b6ec3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxsize <a class="el" href="group__cxmessages.html#ga59b256cd59854cd96a66fecf500b6ec3">cx_log_get_domain_count</a> </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the number of registered log domains. </p>
<dl class="section return"><dt>Returns:</dt><dd>The number of currently registered log domains.</dd></dl>
<p>The function counts the registered log domains and returns the total number of log domains. The returned number may be 0 if no log domain was previously registered. </p>
</div>
</div>
<a class="anchor" id="ga31594ba8e069190d4f708d9f50362d11"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const cxchar* <a class="el" href="group__cxmessages.html#ga31594ba8e069190d4f708d9f50362d11">cx_log_get_domain_name</a> </td>
<td>(</td>
<td class="paramtype">cxsize </td>
<td class="paramname"><em>position</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the name of a log domain. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">position</td><td>Index of the log domain to lookup.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The function returns the name of the log domain, or <code>NULL</code> if <em>position</em> is out of range.</dd></dl>
<p>The function retrieves the name of the log domain registered at index position <em>position</em>. The valid range for <em>position</em> is from 0 to 1 less than the number of domains registered. If an invalid log domain is requested, i.e. no log domain has been previously registered for the given position, the function returns <code>NULL</code>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#ga59b256cd59854cd96a66fecf500b6ec3" title="Get the number of registered log domains.">cx_log_get_domain_count()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga285fc56885fcb786d62dc7bc94119949"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga285fc56885fcb786d62dc7bc94119949">cx_log_remove_handler</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxuint </td>
<td class="paramname"><em>id</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a log handler from a domain. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the log domain. </td></tr>
<tr><td class="paramname">id</td><td>Id number of the handler.</td></tr>
</table>
</dd>
</dl>
<p>Removes the log handler, i.e. in principle the log function, registered with the id number <em>id</em>, from the list of log handlers for the log domain <em>name</em>. </p>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3">cx_warning()</a>.</p>
</div>
</div>
<a class="anchor" id="ga2b9a9a900fb2463559b5672d23eae621"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cx_log_level_flags <a class="el" href="group__cxmessages.html#ga2b9a9a900fb2463559b5672d23eae621">cx_log_set_always_fatal</a> </td>
<td>(</td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>mask</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set log levels to be always fatal. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">mask</td><td>Log message level flags.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Previous mask.</dd></dl>
<p>Log levels set in the log message level flags mask <em>mask</em> will always be treated as fatal. This applies only to the internally known log levels. User defined log levels are not taken into account.</p>
<p>In any case, the function forces errors to be fatal even if the error level was not set in <em>mask</em>. The priviously set mask is replaced by <em>mask</em> and is passed back to the caller as the return value. </p>
</div>
</div>
<a class="anchor" id="gac7d6d283da2defe86ee32592b357d299"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cx_log_func <a class="el" href="group__cxmessages.html#gac7d6d283da2defe86ee32592b357d299">cx_log_set_default_handler</a> </td>
<td>(</td>
<td class="paramtype">cx_log_func </td>
<td class="paramname"><em>func</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the default log handler. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">func</td><td>New handler function.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The previously set print handler.</dd></dl>
<p>The function <em>func</em> is installed as the new default log handler function. Any message passed to <b><a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573" title="Log a formatted message.">cx_log()</a></b> or <b><a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b" title="Log a formatted message using a variable-length argument.">cx_logv()</a></b> is printed using this handler unless a domain and level specific handler has been set for the current message.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gaa41ee3d085b05e65dacc48c437380e2b" title="Set the log handler for a log domain.">cx_log_set_handler()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga64524feb88742a755fb49d2e2024618e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cx_log_level_flags <a class="el" href="group__cxmessages.html#ga64524feb88742a755fb49d2e2024618e">cx_log_set_fatal_mask</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>fatal_mask</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the log message level which are fatal for a given domain. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the log domain. </td></tr>
<tr><td class="paramname">fatal_mask</td><td>The log domains new fatal mask.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Previously installed fatal mask for the domain.</dd></dl>
<p>The log message levels set in the flag mask <em>fatal_mask</em> are treated as being fatal for the log domain with the name <em>name</em>. Even if the error level is not set in <em>fatal_mask</em> the function forces errors to be fatal. </p>
</div>
</div>
<a class="anchor" id="gaa41ee3d085b05e65dacc48c437380e2b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cxuint <a class="el" href="group__cxmessages.html#gaa41ee3d085b05e65dacc48c437380e2b">cx_log_set_handler</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>levels</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_func </td>
<td class="paramname"><em>func</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cxptr </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the log handler for a log domain. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the log domain. </td></tr>
<tr><td class="paramname">levels</td><td>Log levels. </td></tr>
<tr><td class="paramname">func</td><td>log function. </td></tr>
<tr><td class="paramname">data</td><td>User data.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The handler's id for this domain.</dd></dl>
<p>The log function <em>func</em> is set for the domain with the name <em>name</em>, applicable for the log levels given by the flag mask <em>levels</em>. If the log function <em>func</em> requires extra data this can be passed to <em>func</em> through the user data <em>data</em>. </p>
<p>References <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>
</div>
</div>
<a class="anchor" id="ga7da0d562d30cfcf37a25c1e3af1dfb3b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cx_log_level_flags </td>
<td class="paramname"><em>level</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">va_list </td>
<td class="paramname"><em>args</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log a formatted message using a variable-length argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the log domain. </td></tr>
<tr><td class="paramname">level</td><td>The message log level. </td></tr>
<tr><td class="paramname">format</td><td>Format string defining output converstions. </td></tr>
<tr><td class="paramname">args</td><td>Variable-length argument list.</td></tr>
</table>
</dd>
</dl>
<p>The log message, as defined by the format string <em>format</em> and arguments given by the variable-length argument <em>args</em> is formatted according to the conversion directives present in the format string. All standard <b>printf()</b> conversion directives are supported.</p>
<p>The formatted message is logged for the level <em>level</em>, if it is enabled, using the log function set for the log domain <em>name</em>. </p>
<p>References <a class="el" href="group__cxutils.html#ga53d3c63bd0f5132978afe8048170a6a5">cx_bits_find()</a>, <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, <a class="el" href="group__cxstrutils.html#gac6e42a2da10486d296fbac13afe2aeee">cx_strvdupf()</a>, and <a class="el" href="group__cxutils.html#ga7e848550cf5701e299759174e9b0ad89">cx_vsnprintf()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3">cx_critical()</a>, <a class="el" href="group__cxmessages.html#gad86cd013f05c08f9dd3b749dcd940377">cx_error()</a>, <a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573">cx_log()</a>, <a class="el" href="group__cxmessages.html#ga08bec22decc20784b11901f65e4c77dc">cx_message()</a>, and <a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3">cx_warning()</a>.</p>
</div>
</div>
<a class="anchor" id="ga08bec22decc20784b11901f65e4c77dc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga08bec22decc20784b11901f65e4c77dc">cx_message</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log a normal message. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">...</td><td>Arguments to be inserted into the format string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This is a convenience function to log an ordinary message, as specified by the format string <em>format</em> and the following list of arguments, via the installed log handler. </p>
<p>References <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv()</a>.</p>
</div>
</div>
<a class="anchor" id="ga61bf6d7fbd22c7eaabc33028aae024f7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7">cx_print</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Output a formatted message via the print handler. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The message format. </td></tr>
<tr><td class="paramname">...</td><td>Argument list.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>The output message created from the format string <em>format</em> and the converted arguments from the argument list is output via the currently set print handler. The format string may contain all conversion directives supported by <b>printf()</b>. The default print handler outputs messages to <code>stdout</code>.</p>
<p>The <b><a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7" title="Output a formatted message via the print handler.">cx_print()</a></b> function should not be from within libraries for debugging messages, since it may be redirected by applications. Instead, libraries should use <b><a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573" title="Log a formatted message.">cx_log()</a></b>, or the convenience functions <b><a class="el" href="group__cxmessages.html#gad86cd013f05c08f9dd3b749dcd940377" title="Log an error message.">cx_error()</a></b>, <b><a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3" title="Log a "critical" warning.">cx_critical()</a></b>, <b><a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3" title="Log a warning.">cx_warning()</a></b> and <b><a class="el" href="group__cxmessages.html#ga08bec22decc20784b11901f65e4c77dc" title="Log a normal message.">cx_message()</a></b>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gaa597310debec2efd1fcc90cbe2bb9737" title="Set handler for message output.">cx_print_set_handler()</a> </dd></dl>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxstrutils.html#gac6e42a2da10486d296fbac13afe2aeee">cx_strvdupf()</a>.</p>
<p>Referenced by <a class="el" href="group__cxstring.html#gac7f190519bb7e5497c088cf8a60f2856">cx_string_print()</a>.</p>
</div>
</div>
<a class="anchor" id="gaa597310debec2efd1fcc90cbe2bb9737"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cx_print_func <a class="el" href="group__cxmessages.html#gaa597310debec2efd1fcc90cbe2bb9737">cx_print_set_handler</a> </td>
<td>(</td>
<td class="paramtype">cx_print_func </td>
<td class="paramname"><em>func</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set handler for message output. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">func</td><td>New handler function.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The previously set print handler.</dd></dl>
<p>The function <em>func</em> is installed as the new message printing function. Any message passed to <b><a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7" title="Output a formatted message via the print handler.">cx_print()</a></b> is printed using this handler. The default print handler just outputs the message text to <code>stdout</code>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#ga61bf6d7fbd22c7eaabc33028aae024f7" title="Output a formatted message via the print handler.">cx_print()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gadce1cff77bbf105e15da2c3fc1c9caec"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#gadce1cff77bbf105e15da2c3fc1c9caec">cx_printerr</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Output a formatted message via the error message handler. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The message format. </td></tr>
<tr><td class="paramname">...</td><td>Argument list.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>The output error message created from the format string <em>format</em> and the converted arguments from the argument list is output via the currently set error message handler. The format string may contain all conversion directives supported by <b>printf()</b>. The default error message handler outputs messages to <code>stderr</code>.</p>
<p>The <b><a class="el" href="group__cxmessages.html#gadce1cff77bbf105e15da2c3fc1c9caec" title="Output a formatted message via the error message handler.">cx_printerr()</a></b> function should not be from within libraries for debugging messages, since it may be redirected by applications. Instead, libraries should use <b><a class="el" href="group__cxmessages.html#ga81586bd99c04f4a8e7cc5a2d55e74573" title="Log a formatted message.">cx_log()</a></b>, or the convenience functions <b><a class="el" href="group__cxmessages.html#gad86cd013f05c08f9dd3b749dcd940377" title="Log an error message.">cx_error()</a></b>, <b><a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3" title="Log a "critical" warning.">cx_critical()</a></b>, <b><a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3" title="Log a warning.">cx_warning()</a></b> and <b><a class="el" href="group__cxmessages.html#ga08bec22decc20784b11901f65e4c77dc" title="Log a normal message.">cx_message()</a></b>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gabab9205d88eccc39c650af1b5df3c0ca" title="Set handler for error message output.">cx_printerr_set_handler()</a> </dd></dl>
<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>, and <a class="el" href="group__cxstrutils.html#gac6e42a2da10486d296fbac13afe2aeee">cx_strvdupf()</a>.</p>
</div>
</div>
<a class="anchor" id="gabab9205d88eccc39c650af1b5df3c0ca"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cx_print_func <a class="el" href="group__cxmessages.html#gabab9205d88eccc39c650af1b5df3c0ca">cx_printerr_set_handler</a> </td>
<td>(</td>
<td class="paramtype">cx_print_func </td>
<td class="paramname"><em>func</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set handler for error message output. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">func</td><td>New handler function.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The previously set error message handler.</dd></dl>
<p>The function <em>func</em> is installed as the new error message printing function. Any message passed to <b><a class="el" href="group__cxmessages.html#gadce1cff77bbf105e15da2c3fc1c9caec" title="Output a formatted message via the error message handler.">cx_printerr()</a></b> is printed using this handler. The default print handler just outputs the error message text to <code>stderr</code>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gadce1cff77bbf105e15da2c3fc1c9caec" title="Output a formatted message via the error message handler.">cx_printerr()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga71f3ac7c5d9726daeba0826a260fb2d3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__cxmessages.html#ga71f3ac7c5d9726daeba0826a260fb2d3">cx_warning</a> </td>
<td>(</td>
<td class="paramtype">const cxchar * </td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Log a warning. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">format</td><td>The format string. </td></tr>
<tr><td class="paramname">...</td><td>Arguments to be inserted into the format string.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Nothing.</dd></dl>
<p>This is a convenience function to log a warning message, as specified by the format string <em>format</em> and the following list of arguments, via the installed log handler.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__cxmessages.html#gae1eb53dfd889fdf06f03414292e642b3" title="Log a "critical" warning.">cx_critical()</a> </dd></dl>
<p>References <a class="el" href="group__cxmessages.html#ga7da0d562d30cfcf37a25c1e3af1dfb3b">cx_logv()</a>.</p>
<p>Referenced by <a class="el" href="group__cxmessages.html#ga285fc56885fcb786d62dc7bc94119949">cx_log_remove_handler()</a>, and <a class="el" href="group__cxmemory.html#ga0c60a509c010b61711b01103ae030b4c">cx_memory_vtable_set()</a>.</p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue May 22 2012 06:56:06 for C Standard Library Extensions by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>
</body>
</html>
|