Mon, 08 Aug 2022 17:12:00 +0200
#201 - remove dangerous allocator config
There is no plausible use case, except using the testing
allocator in the test case, and having the possibility to
specify any allocator (including another mempool) causes
more harm than good.
<!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"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>ucx: /home/mike/workspace/c/ucx/src/ucx/logging.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">ucx </div> <div id="projectbrief">UAP Common Extensions</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#define-members">Macros</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">logging.h File Reference</div> </div> </div><!--header--> <div class="contents"> <p>Logging API. <a href="#details">More...</a></p> <div class="textblock"><code>#include "<a class="el" href="ucx_8h_source.html">ucx.h</a>"</code><br /> <code>#include "<a class="el" href="map_8h_source.html">map.h</a>"</code><br /> <code>#include "<a class="el" href="string_8h_source.html">string.h</a>"</code><br /> <code>#include <stdio.h></code><br /> </div> <p><a href="logging_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structUcxLogger.html">UcxLogger</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The UCX Logger object. <a href="structUcxLogger.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:aa254c07fe3a907613e2256a318d5c9a8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa254c07fe3a907613e2256a318d5c9a8">UCX_LOGGER_ERROR</a>   0x00</td></tr> <tr class="memdesc:aa254c07fe3a907613e2256a318d5c9a8"><td class="mdescLeft"> </td><td class="mdescRight">Log level for error messages. <a href="#aa254c07fe3a907613e2256a318d5c9a8">More...</a><br /></td></tr> <tr class="separator:aa254c07fe3a907613e2256a318d5c9a8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abd01ca11486226ba34e8f7028d9fffba"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#abd01ca11486226ba34e8f7028d9fffba">UCX_LOGGER_WARN</a>   0x10</td></tr> <tr class="memdesc:abd01ca11486226ba34e8f7028d9fffba"><td class="mdescLeft"> </td><td class="mdescRight">Log level for warning messages. <a href="#abd01ca11486226ba34e8f7028d9fffba">More...</a><br /></td></tr> <tr class="separator:abd01ca11486226ba34e8f7028d9fffba"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4b0178bf60a6129373ffc59114ca4c9b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a4b0178bf60a6129373ffc59114ca4c9b">UCX_LOGGER_INFO</a>   0x20</td></tr> <tr class="memdesc:a4b0178bf60a6129373ffc59114ca4c9b"><td class="mdescLeft"> </td><td class="mdescRight">Log level for information messages. <a href="#a4b0178bf60a6129373ffc59114ca4c9b">More...</a><br /></td></tr> <tr class="separator:a4b0178bf60a6129373ffc59114ca4c9b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acff01d1ef919ea997cfce755fc1b83d8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#acff01d1ef919ea997cfce755fc1b83d8">UCX_LOGGER_DEBUG</a>   0x30</td></tr> <tr class="memdesc:acff01d1ef919ea997cfce755fc1b83d8"><td class="mdescLeft"> </td><td class="mdescRight">Log level for debug messages. <a href="#acff01d1ef919ea997cfce755fc1b83d8">More...</a><br /></td></tr> <tr class="separator:acff01d1ef919ea997cfce755fc1b83d8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a55b88d1fec7036d841b3ddd6195c5586"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a55b88d1fec7036d841b3ddd6195c5586">UCX_LOGGER_TRACE</a>   0x40</td></tr> <tr class="memdesc:a55b88d1fec7036d841b3ddd6195c5586"><td class="mdescLeft"> </td><td class="mdescRight">Log level for trace messages. <a href="#a55b88d1fec7036d841b3ddd6195c5586">More...</a><br /></td></tr> <tr class="separator:a55b88d1fec7036d841b3ddd6195c5586"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aee18bc20e58ffb69910121512c350839"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aee18bc20e58ffb69910121512c350839">UCX_LOGGER_LEVEL</a>   0x01</td></tr> <tr class="memdesc:aee18bc20e58ffb69910121512c350839"><td class="mdescLeft"> </td><td class="mdescRight">Output flag for the log level. <a href="#aee18bc20e58ffb69910121512c350839">More...</a><br /></td></tr> <tr class="separator:aee18bc20e58ffb69910121512c350839"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a38607008268b4f776ee500fb95d2e823"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a38607008268b4f776ee500fb95d2e823">UCX_LOGGER_TIMESTAMP</a>   0x02</td></tr> <tr class="memdesc:a38607008268b4f776ee500fb95d2e823"><td class="mdescLeft"> </td><td class="mdescRight">Output flag for the timestmap. <a href="#a38607008268b4f776ee500fb95d2e823">More...</a><br /></td></tr> <tr class="separator:a38607008268b4f776ee500fb95d2e823"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a0e0d72b12616c1e49ff8834eaf4cb8a2">UCX_LOGGER_SOURCE</a>   0x04</td></tr> <tr class="memdesc:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="mdescLeft"> </td><td class="mdescRight">Output flag for the source. <a href="#a0e0d72b12616c1e49ff8834eaf4cb8a2">More...</a><br /></td></tr> <tr class="separator:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a5cffc19502c4c90bfb3bd3bbcd18170a">ucx_logger_register_level</a>(logger, level, name)</td></tr> <tr class="memdesc:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="mdescLeft"> </td><td class="mdescRight">Registers a custom log level. <a href="#a5cffc19502c4c90bfb3bd3bbcd18170a">More...</a><br /></td></tr> <tr class="separator:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa0245325031d95799b28def177fd14ec"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, level, ...)   <a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801">ucx_logger_logf</a>(logger, level, __FILE__, __LINE__, __VA_ARGS__)</td></tr> <tr class="memdesc:aa0245325031d95799b28def177fd14ec"><td class="mdescLeft"> </td><td class="mdescRight">Logs a message at the specified level. <a href="#aa0245325031d95799b28def177fd14ec">More...</a><br /></td></tr> <tr class="separator:aa0245325031d95799b28def177fd14ec"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6a9e472e14d6768e59d96d245e065397"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a6a9e472e14d6768e59d96d245e065397">ucx_logger_error</a>(logger, ...)   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#aa254c07fe3a907613e2256a318d5c9a8">UCX_LOGGER_ERROR</a>, __VA_ARGS__)</td></tr> <tr class="memdesc:a6a9e472e14d6768e59d96d245e065397"><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for logging an error message. <a href="#a6a9e472e14d6768e59d96d245e065397">More...</a><br /></td></tr> <tr class="separator:a6a9e472e14d6768e59d96d245e065397"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a98464d8d51376ce2716dcc4eca00d5da"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a98464d8d51376ce2716dcc4eca00d5da">ucx_logger_info</a>(logger, ...)   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#a4b0178bf60a6129373ffc59114ca4c9b">UCX_LOGGER_INFO</a>, __VA_ARGS__)</td></tr> <tr class="memdesc:a98464d8d51376ce2716dcc4eca00d5da"><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for logging an information message. <a href="#a98464d8d51376ce2716dcc4eca00d5da">More...</a><br /></td></tr> <tr class="separator:a98464d8d51376ce2716dcc4eca00d5da"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aca7bd861b646892813fd7310c0aa69af"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aca7bd861b646892813fd7310c0aa69af">ucx_logger_warn</a>(logger, ...)   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#abd01ca11486226ba34e8f7028d9fffba">UCX_LOGGER_WARN</a>, __VA_ARGS__)</td></tr> <tr class="memdesc:aca7bd861b646892813fd7310c0aa69af"><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for logging a warning message. <a href="#aca7bd861b646892813fd7310c0aa69af">More...</a><br /></td></tr> <tr class="separator:aca7bd861b646892813fd7310c0aa69af"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2936402799892db5138e5f1f8c25db0c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a2936402799892db5138e5f1f8c25db0c">ucx_logger_debug</a>(logger, ...)   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#acff01d1ef919ea997cfce755fc1b83d8">UCX_LOGGER_DEBUG</a>, __VA_ARGS__)</td></tr> <tr class="memdesc:a2936402799892db5138e5f1f8c25db0c"><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for logging a debug message. <a href="#a2936402799892db5138e5f1f8c25db0c">More...</a><br /></td></tr> <tr class="separator:a2936402799892db5138e5f1f8c25db0c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3031b7ff13f4cfae9c2916543be2877c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a3031b7ff13f4cfae9c2916543be2877c">ucx_logger_trace</a>(logger, ...)   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#a55b88d1fec7036d841b3ddd6195c5586">UCX_LOGGER_TRACE</a>, __VA_ARGS__)</td></tr> <tr class="memdesc:a3031b7ff13f4cfae9c2916543be2877c"><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for logging a trace message. <a href="#a3031b7ff13f4cfae9c2916543be2877c">More...</a><br /></td></tr> <tr class="separator:a3031b7ff13f4cfae9c2916543be2877c"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ac560f8517d2172794c9d2691735ec48c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxLogger.html">UcxLogger</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ac560f8517d2172794c9d2691735ec48c">ucx_logger_new</a> (void *stream, unsigned int level, unsigned int mask)</td></tr> <tr class="memdesc:ac560f8517d2172794c9d2691735ec48c"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new logger. <a href="#ac560f8517d2172794c9d2691735ec48c">More...</a><br /></td></tr> <tr class="separator:ac560f8517d2172794c9d2691735ec48c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac4697b784e01ec990d2acea192e21658"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ac4697b784e01ec990d2acea192e21658">ucx_logger_free</a> (<a class="el" href="structUcxLogger.html">UcxLogger</a> *logger)</td></tr> <tr class="memdesc:ac4697b784e01ec990d2acea192e21658"><td class="mdescLeft"> </td><td class="mdescRight">Destroys the logger. <a href="#ac4697b784e01ec990d2acea192e21658">More...</a><br /></td></tr> <tr class="separator:ac4697b784e01ec990d2acea192e21658"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac337e5d02ebea565012d4c11bd643801"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801">ucx_logger_logf</a> (<a class="el" href="structUcxLogger.html">UcxLogger</a> *logger, unsigned int level, const char *file, const unsigned int line, const char *format,...)</td></tr> <tr class="memdesc:ac337e5d02ebea565012d4c11bd643801"><td class="mdescLeft"> </td><td class="mdescRight">Internal log function - use macros instead. <a href="#ac337e5d02ebea565012d4c11bd643801">More...</a><br /></td></tr> <tr class="separator:ac337e5d02ebea565012d4c11bd643801"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Logging API. </p> <dl class="section author"><dt>Author</dt><dd>Mike Becker, Olaf Wintermann </dd></dl> </div><h2 class="groupheader">Macro Definition Documentation</h2> <a id="acff01d1ef919ea997cfce755fc1b83d8"></a> <h2 class="memtitle"><span class="permalink"><a href="#acff01d1ef919ea997cfce755fc1b83d8">◆ </a></span>UCX_LOGGER_DEBUG</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_DEBUG   0x30</td> </tr> </table> </div><div class="memdoc"> <p>Log level for debug messages. </p> </div> </div> <a id="a2936402799892db5138e5f1f8c25db0c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2936402799892db5138e5f1f8c25db0c">◆ </a></span>ucx_logger_debug</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_debug</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </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>   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#acff01d1ef919ea997cfce755fc1b83d8">UCX_LOGGER_DEBUG</a>, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Shortcut for logging a debug message. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <a id="aa254c07fe3a907613e2256a318d5c9a8"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa254c07fe3a907613e2256a318d5c9a8">◆ </a></span>UCX_LOGGER_ERROR</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_ERROR   0x00</td> </tr> </table> </div><div class="memdoc"> <p>Log level for error messages. </p> </div> </div> <a id="a6a9e472e14d6768e59d96d245e065397"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6a9e472e14d6768e59d96d245e065397">◆ </a></span>ucx_logger_error</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_error</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </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>   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#aa254c07fe3a907613e2256a318d5c9a8">UCX_LOGGER_ERROR</a>, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Shortcut for logging an error message. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <a id="a4b0178bf60a6129373ffc59114ca4c9b"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4b0178bf60a6129373ffc59114ca4c9b">◆ </a></span>UCX_LOGGER_INFO</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_INFO   0x20</td> </tr> </table> </div><div class="memdoc"> <p>Log level for information messages. </p> </div> </div> <a id="a98464d8d51376ce2716dcc4eca00d5da"></a> <h2 class="memtitle"><span class="permalink"><a href="#a98464d8d51376ce2716dcc4eca00d5da">◆ </a></span>ucx_logger_info</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_info</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </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>   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#a4b0178bf60a6129373ffc59114ca4c9b">UCX_LOGGER_INFO</a>, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Shortcut for logging an information message. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <a id="aee18bc20e58ffb69910121512c350839"></a> <h2 class="memtitle"><span class="permalink"><a href="#aee18bc20e58ffb69910121512c350839">◆ </a></span>UCX_LOGGER_LEVEL</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_LEVEL   0x01</td> </tr> </table> </div><div class="memdoc"> <p>Output flag for the log level. </p> <p>If this flag is set, the log message will contain the log level. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="structUcxLogger.html#a1de0db2e02dcf03366268f6943f8b97c" title="A configuration mask for automatic output. ">UcxLogger.mask</a> </dd></dl> </div> </div> <a id="aa0245325031d95799b28def177fd14ec"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa0245325031d95799b28def177fd14ec">◆ </a></span>ucx_logger_log</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_log</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">level, </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>   <a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801">ucx_logger_logf</a>(logger, level, __FILE__, __LINE__, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Logs a message at the specified level. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">level</td><td>the level to log the message on </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <a id="a5cffc19502c4c90bfb3bd3bbcd18170a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5cffc19502c4c90bfb3bd3bbcd18170a">◆ </a></span>ucx_logger_register_level</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_register_level</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">level, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname">name </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <b>Value:</b><div class="fragment"><div class="line">{\</div><div class="line"> unsigned <span class="keywordtype">int</span> l; \</div><div class="line"> l = level; \</div><div class="line"> ucx_map_int_put(logger->levels, l, (<span class="keywordtype">void</span>*) <span class="stringliteral">"["</span> name <span class="stringliteral">"]"</span>); \</div><div class="line"> } <span class="keywordflow">while</span> (0);</div></div><!-- fragment --> <p>Registers a custom log level. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger </td></tr> <tr><td class="paramname">level</td><td>the log level as unsigned integer </td></tr> <tr><td class="paramname">name</td><td>a string literal describing the level </td></tr> </table> </dd> </dl> </div> </div> <a id="a0e0d72b12616c1e49ff8834eaf4cb8a2"></a> <h2 class="memtitle"><span class="permalink"><a href="#a0e0d72b12616c1e49ff8834eaf4cb8a2">◆ </a></span>UCX_LOGGER_SOURCE</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_SOURCE   0x04</td> </tr> </table> </div><div class="memdoc"> <p>Output flag for the source. </p> <p>If this flag is set, the log message will contain the source file and line number. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="structUcxLogger.html#a1de0db2e02dcf03366268f6943f8b97c" title="A configuration mask for automatic output. ">UcxLogger.mask</a> </dd></dl> </div> </div> <a id="a38607008268b4f776ee500fb95d2e823"></a> <h2 class="memtitle"><span class="permalink"><a href="#a38607008268b4f776ee500fb95d2e823">◆ </a></span>UCX_LOGGER_TIMESTAMP</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_TIMESTAMP   0x02</td> </tr> </table> </div><div class="memdoc"> <p>Output flag for the timestmap. </p> <p>If this flag is set, the log message will contain the timestmap. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="structUcxLogger.html#a1de0db2e02dcf03366268f6943f8b97c" title="A configuration mask for automatic output. ">UcxLogger.mask</a> </dd></dl> </div> </div> <a id="a55b88d1fec7036d841b3ddd6195c5586"></a> <h2 class="memtitle"><span class="permalink"><a href="#a55b88d1fec7036d841b3ddd6195c5586">◆ </a></span>UCX_LOGGER_TRACE</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_TRACE   0x40</td> </tr> </table> </div><div class="memdoc"> <p>Log level for trace messages. </p> </div> </div> <a id="a3031b7ff13f4cfae9c2916543be2877c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3031b7ff13f4cfae9c2916543be2877c">◆ </a></span>ucx_logger_trace</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_trace</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </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>   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#a55b88d1fec7036d841b3ddd6195c5586">UCX_LOGGER_TRACE</a>, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Shortcut for logging a trace message. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <a id="abd01ca11486226ba34e8f7028d9fffba"></a> <h2 class="memtitle"><span class="permalink"><a href="#abd01ca11486226ba34e8f7028d9fffba">◆ </a></span>UCX_LOGGER_WARN</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UCX_LOGGER_WARN   0x10</td> </tr> </table> </div><div class="memdoc"> <p>Log level for warning messages. </p> </div> </div> <a id="aca7bd861b646892813fd7310c0aa69af"></a> <h2 class="memtitle"><span class="permalink"><a href="#aca7bd861b646892813fd7310c0aa69af">◆ </a></span>ucx_logger_warn</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ucx_logger_warn</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">logger, </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>   <a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, <a class="el" href="logging_8h.html#abd01ca11486226ba34e8f7028d9fffba">UCX_LOGGER_WARN</a>, __VA_ARGS__)</td> </tr> </table> </div><div class="memdoc"> <p>Shortcut for logging a warning message. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">...</td><td>format string and arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801" title="Internal log function - use macros instead. ">ucx_logger_logf()</a> </dd></dl> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a id="ac4697b784e01ec990d2acea192e21658"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac4697b784e01ec990d2acea192e21658">◆ </a></span>ucx_logger_free()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ucx_logger_free </td> <td>(</td> <td class="paramtype"><a class="el" href="structUcxLogger.html">UcxLogger</a> * </td> <td class="paramname"><em>logger</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Destroys the logger. </p> <p>The map containing the valid log levels is also automatically destroyed.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to destroy </td></tr> </table> </dd> </dl> </div> </div> <a id="ac337e5d02ebea565012d4c11bd643801"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac337e5d02ebea565012d4c11bd643801">◆ </a></span>ucx_logger_logf()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ucx_logger_logf </td> <td>(</td> <td class="paramtype"><a class="el" href="structUcxLogger.html">UcxLogger</a> * </td> <td class="paramname"><em>logger</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>level</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const unsigned int </td> <td class="paramname"><em>line</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </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>Internal log function - use macros instead. </p> <p>This function uses the <code>format</code> and variadic arguments for a printf()-style output of the log message.</p> <p>Dependent on the <a class="el" href="structUcxLogger.html#a1de0db2e02dcf03366268f6943f8b97c" title="A configuration mask for automatic output. ">UcxLogger.mask</a> some information is prepended. The complete format is:</p> <p><code>[LEVEL] [TIMESTAMP] [SOURCEFILE]:[LINENO] message</code></p> <p><b>Attention:</b> the message (including automatically generated information) is limited to 4096 characters. The level description is limited to 256 characters and the timestamp string is limited to 128 characters.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">logger</td><td>the logger to use </td></tr> <tr><td class="paramname">level</td><td>the level to log on </td></tr> <tr><td class="paramname">file</td><td>information about the source file </td></tr> <tr><td class="paramname">line</td><td>information about the source line number </td></tr> <tr><td class="paramname">format</td><td>format string </td></tr> <tr><td class="paramname">...</td><td>arguments </td></tr> </table> </dd> </dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec" title="Logs a message at the specified level. ">ucx_logger_log()</a> </dd></dl> </div> </div> <a id="ac560f8517d2172794c9d2691735ec48c"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac560f8517d2172794c9d2691735ec48c">◆ </a></span>ucx_logger_new()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structUcxLogger.html">UcxLogger</a>* ucx_logger_new </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"><em>stream</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>level</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"><em>mask</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Creates a new logger. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">stream</td><td>the stream, which the logger shall write to </td></tr> <tr><td class="paramname">level</td><td>the level on which the logger shall operate </td></tr> <tr><td class="paramname">mask</td><td>configuration mask (cf. <a class="el" href="structUcxLogger.html#a1de0db2e02dcf03366268f6943f8b97c" title="A configuration mask for automatic output. ">UcxLogger.mask</a>) </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>a new logger object </dd></dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Dec 19 2019 19:58:24 for ucx by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>