docs/api-2.1/logging_8h.html

changeset 390
d345541018fa
equal deleted inserted replaced
389:92e482410453 390:d345541018fa
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.13"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>ucx: /home/mike/workspace/c/ucx/src/ucx/logging.h File Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="search/searchdata.js"></script>
14 <script type="text/javascript" src="search/search.js"></script>
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
16 </head>
17 <body>
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
19 <div id="titlearea">
20 <table cellspacing="0" cellpadding="0">
21 <tbody>
22 <tr style="height: 56px;">
23 <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
24 <td id="projectalign" style="padding-left: 0.5em;">
25 <div id="projectname">ucx
26 </div>
27 <div id="projectbrief">UAP Common Extensions</div>
28 </td>
29 </tr>
30 </tbody>
31 </table>
32 </div>
33 <!-- end header part -->
34 <!-- Generated by Doxygen 1.8.13 -->
35 <script type="text/javascript">
36 var searchBox = new SearchBox("searchBox", "search",false,'Search');
37 </script>
38 <script type="text/javascript" src="menudata.js"></script>
39 <script type="text/javascript" src="menu.js"></script>
40 <script type="text/javascript">
41 $(function() {
42 initMenu('',true,false,'search.php','Search');
43 $(document).ready(function() { init_search(); });
44 });
45 </script>
46 <div id="main-nav"></div>
47 <!-- window showing the filter options -->
48 <div id="MSearchSelectWindow"
49 onmouseover="return searchBox.OnSearchSelectShow()"
50 onmouseout="return searchBox.OnSearchSelectHide()"
51 onkeydown="return searchBox.OnSearchSelectKey(event)">
52 </div>
53
54 <!-- iframe showing the search results (closed by default) -->
55 <div id="MSearchResultsWindow">
56 <iframe src="javascript:void(0)" frameborder="0"
57 name="MSearchResults" id="MSearchResults">
58 </iframe>
59 </div>
60
61 <div id="nav-path" class="navpath">
62 <ul>
63 <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>
64 </div>
65 </div><!-- top -->
66 <div class="header">
67 <div class="summary">
68 <a href="#nested-classes">Data Structures</a> &#124;
69 <a href="#define-members">Macros</a> &#124;
70 <a href="#func-members">Functions</a> </div>
71 <div class="headertitle">
72 <div class="title">logging.h File Reference</div> </div>
73 </div><!--header-->
74 <div class="contents">
75
76 <p>Logging API.
77 <a href="#details">More...</a></p>
78 <div class="textblock"><code>#include &quot;<a class="el" href="ucx_8h_source.html">ucx.h</a>&quot;</code><br />
79 <code>#include &quot;<a class="el" href="map_8h_source.html">map.h</a>&quot;</code><br />
80 <code>#include &quot;<a class="el" href="string_8h_source.html">string.h</a>&quot;</code><br />
81 <code>#include &lt;stdio.h&gt;</code><br />
82 </div>
83 <p><a href="logging_8h_source.html">Go to the source code of this file.</a></p>
84 <table class="memberdecls">
85 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
86 Data Structures</h2></td></tr>
87 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUcxLogger.html">UcxLogger</a></td></tr>
88 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The UCX Logger object. <a href="structUcxLogger.html#details">More...</a><br /></td></tr>
89 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
90 </table><table class="memberdecls">
91 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
92 Macros</h2></td></tr>
93 <tr class="memitem:aa254c07fe3a907613e2256a318d5c9a8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa254c07fe3a907613e2256a318d5c9a8">UCX_LOGGER_ERROR</a>&#160;&#160;&#160;0x00</td></tr>
94 <tr class="memdesc:aa254c07fe3a907613e2256a318d5c9a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log level for error messages. <a href="#aa254c07fe3a907613e2256a318d5c9a8">More...</a><br /></td></tr>
95 <tr class="separator:aa254c07fe3a907613e2256a318d5c9a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
96 <tr class="memitem:abd01ca11486226ba34e8f7028d9fffba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#abd01ca11486226ba34e8f7028d9fffba">UCX_LOGGER_WARN</a>&#160;&#160;&#160;0x10</td></tr>
97 <tr class="memdesc:abd01ca11486226ba34e8f7028d9fffba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log level for warning messages. <a href="#abd01ca11486226ba34e8f7028d9fffba">More...</a><br /></td></tr>
98 <tr class="separator:abd01ca11486226ba34e8f7028d9fffba"><td class="memSeparator" colspan="2">&#160;</td></tr>
99 <tr class="memitem:a4b0178bf60a6129373ffc59114ca4c9b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a4b0178bf60a6129373ffc59114ca4c9b">UCX_LOGGER_INFO</a>&#160;&#160;&#160;0x20</td></tr>
100 <tr class="memdesc:a4b0178bf60a6129373ffc59114ca4c9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log level for information messages. <a href="#a4b0178bf60a6129373ffc59114ca4c9b">More...</a><br /></td></tr>
101 <tr class="separator:a4b0178bf60a6129373ffc59114ca4c9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
102 <tr class="memitem:acff01d1ef919ea997cfce755fc1b83d8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#acff01d1ef919ea997cfce755fc1b83d8">UCX_LOGGER_DEBUG</a>&#160;&#160;&#160;0x30</td></tr>
103 <tr class="memdesc:acff01d1ef919ea997cfce755fc1b83d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log level for debug messages. <a href="#acff01d1ef919ea997cfce755fc1b83d8">More...</a><br /></td></tr>
104 <tr class="separator:acff01d1ef919ea997cfce755fc1b83d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
105 <tr class="memitem:a55b88d1fec7036d841b3ddd6195c5586"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a55b88d1fec7036d841b3ddd6195c5586">UCX_LOGGER_TRACE</a>&#160;&#160;&#160;0x40</td></tr>
106 <tr class="memdesc:a55b88d1fec7036d841b3ddd6195c5586"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log level for trace messages. <a href="#a55b88d1fec7036d841b3ddd6195c5586">More...</a><br /></td></tr>
107 <tr class="separator:a55b88d1fec7036d841b3ddd6195c5586"><td class="memSeparator" colspan="2">&#160;</td></tr>
108 <tr class="memitem:aee18bc20e58ffb69910121512c350839"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aee18bc20e58ffb69910121512c350839">UCX_LOGGER_LEVEL</a>&#160;&#160;&#160;0x01</td></tr>
109 <tr class="memdesc:aee18bc20e58ffb69910121512c350839"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output flag for the log level. <a href="#aee18bc20e58ffb69910121512c350839">More...</a><br /></td></tr>
110 <tr class="separator:aee18bc20e58ffb69910121512c350839"><td class="memSeparator" colspan="2">&#160;</td></tr>
111 <tr class="memitem:a38607008268b4f776ee500fb95d2e823"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a38607008268b4f776ee500fb95d2e823">UCX_LOGGER_TIMESTAMP</a>&#160;&#160;&#160;0x02</td></tr>
112 <tr class="memdesc:a38607008268b4f776ee500fb95d2e823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output flag for the timestmap. <a href="#a38607008268b4f776ee500fb95d2e823">More...</a><br /></td></tr>
113 <tr class="separator:a38607008268b4f776ee500fb95d2e823"><td class="memSeparator" colspan="2">&#160;</td></tr>
114 <tr class="memitem:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a0e0d72b12616c1e49ff8834eaf4cb8a2">UCX_LOGGER_SOURCE</a>&#160;&#160;&#160;0x04</td></tr>
115 <tr class="memdesc:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output flag for the source. <a href="#a0e0d72b12616c1e49ff8834eaf4cb8a2">More...</a><br /></td></tr>
116 <tr class="separator:a0e0d72b12616c1e49ff8834eaf4cb8a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
117 <tr class="memitem:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a5cffc19502c4c90bfb3bd3bbcd18170a">ucx_logger_register_level</a>(logger, level, name)</td></tr>
118 <tr class="memdesc:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a custom log level. <a href="#a5cffc19502c4c90bfb3bd3bbcd18170a">More...</a><br /></td></tr>
119 <tr class="separator:a5cffc19502c4c90bfb3bd3bbcd18170a"><td class="memSeparator" colspan="2">&#160;</td></tr>
120 <tr class="memitem:aa0245325031d95799b28def177fd14ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aa0245325031d95799b28def177fd14ec">ucx_logger_log</a>(logger, level, ...)&#160;&#160;&#160;<a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801">ucx_logger_logf</a>(logger, level, __FILE__, __LINE__, __VA_ARGS__)</td></tr>
121 <tr class="memdesc:aa0245325031d95799b28def177fd14ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logs a message at the specified level. <a href="#aa0245325031d95799b28def177fd14ec">More...</a><br /></td></tr>
122 <tr class="separator:aa0245325031d95799b28def177fd14ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
123 <tr class="memitem:a6a9e472e14d6768e59d96d245e065397"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a6a9e472e14d6768e59d96d245e065397">ucx_logger_error</a>(logger, ...)&#160;&#160;&#160;<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>
124 <tr class="memdesc:a6a9e472e14d6768e59d96d245e065397"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut for logging an error message. <a href="#a6a9e472e14d6768e59d96d245e065397">More...</a><br /></td></tr>
125 <tr class="separator:a6a9e472e14d6768e59d96d245e065397"><td class="memSeparator" colspan="2">&#160;</td></tr>
126 <tr class="memitem:a98464d8d51376ce2716dcc4eca00d5da"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a98464d8d51376ce2716dcc4eca00d5da">ucx_logger_info</a>(logger, ...)&#160;&#160;&#160;<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>
127 <tr class="memdesc:a98464d8d51376ce2716dcc4eca00d5da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut for logging an information message. <a href="#a98464d8d51376ce2716dcc4eca00d5da">More...</a><br /></td></tr>
128 <tr class="separator:a98464d8d51376ce2716dcc4eca00d5da"><td class="memSeparator" colspan="2">&#160;</td></tr>
129 <tr class="memitem:aca7bd861b646892813fd7310c0aa69af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#aca7bd861b646892813fd7310c0aa69af">ucx_logger_warn</a>(logger, ...)&#160;&#160;&#160;<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>
130 <tr class="memdesc:aca7bd861b646892813fd7310c0aa69af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut for logging a warning message. <a href="#aca7bd861b646892813fd7310c0aa69af">More...</a><br /></td></tr>
131 <tr class="separator:aca7bd861b646892813fd7310c0aa69af"><td class="memSeparator" colspan="2">&#160;</td></tr>
132 <tr class="memitem:a2936402799892db5138e5f1f8c25db0c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a2936402799892db5138e5f1f8c25db0c">ucx_logger_debug</a>(logger, ...)&#160;&#160;&#160;<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>
133 <tr class="memdesc:a2936402799892db5138e5f1f8c25db0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut for logging a debug message. <a href="#a2936402799892db5138e5f1f8c25db0c">More...</a><br /></td></tr>
134 <tr class="separator:a2936402799892db5138e5f1f8c25db0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
135 <tr class="memitem:a3031b7ff13f4cfae9c2916543be2877c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#a3031b7ff13f4cfae9c2916543be2877c">ucx_logger_trace</a>(logger, ...)&#160;&#160;&#160;<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>
136 <tr class="memdesc:a3031b7ff13f4cfae9c2916543be2877c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shortcut for logging a trace message. <a href="#a3031b7ff13f4cfae9c2916543be2877c">More...</a><br /></td></tr>
137 <tr class="separator:a3031b7ff13f4cfae9c2916543be2877c"><td class="memSeparator" colspan="2">&#160;</td></tr>
138 </table><table class="memberdecls">
139 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
140 Functions</h2></td></tr>
141 <tr class="memitem:ac560f8517d2172794c9d2691735ec48c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxLogger.html">UcxLogger</a> *&#160;</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>
142 <tr class="memdesc:ac560f8517d2172794c9d2691735ec48c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new logger. <a href="#ac560f8517d2172794c9d2691735ec48c">More...</a><br /></td></tr>
143 <tr class="separator:ac560f8517d2172794c9d2691735ec48c"><td class="memSeparator" colspan="2">&#160;</td></tr>
144 <tr class="memitem:ac4697b784e01ec990d2acea192e21658"><td class="memItemLeft" align="right" valign="top">void&#160;</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>
145 <tr class="memdesc:ac4697b784e01ec990d2acea192e21658"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the logger. <a href="#ac4697b784e01ec990d2acea192e21658">More...</a><br /></td></tr>
146 <tr class="separator:ac4697b784e01ec990d2acea192e21658"><td class="memSeparator" colspan="2">&#160;</td></tr>
147 <tr class="memitem:ac337e5d02ebea565012d4c11bd643801"><td class="memItemLeft" align="right" valign="top">void&#160;</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>
148 <tr class="memdesc:ac337e5d02ebea565012d4c11bd643801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal log function - use macros instead. <a href="#ac337e5d02ebea565012d4c11bd643801">More...</a><br /></td></tr>
149 <tr class="separator:ac337e5d02ebea565012d4c11bd643801"><td class="memSeparator" colspan="2">&#160;</td></tr>
150 </table>
151 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
152 <div class="textblock"><p>Logging API. </p>
153 <dl class="section author"><dt>Author</dt><dd>Mike Becker, Olaf Wintermann </dd></dl>
154 </div><h2 class="groupheader">Macro Definition Documentation</h2>
155 <a id="acff01d1ef919ea997cfce755fc1b83d8"></a>
156 <h2 class="memtitle"><span class="permalink"><a href="#acff01d1ef919ea997cfce755fc1b83d8">&#9670;&nbsp;</a></span>UCX_LOGGER_DEBUG</h2>
157
158 <div class="memitem">
159 <div class="memproto">
160 <table class="memname">
161 <tr>
162 <td class="memname">#define UCX_LOGGER_DEBUG&#160;&#160;&#160;0x30</td>
163 </tr>
164 </table>
165 </div><div class="memdoc">
166
167 <p>Log level for debug messages. </p>
168
169 </div>
170 </div>
171 <a id="a2936402799892db5138e5f1f8c25db0c"></a>
172 <h2 class="memtitle"><span class="permalink"><a href="#a2936402799892db5138e5f1f8c25db0c">&#9670;&nbsp;</a></span>ucx_logger_debug</h2>
173
174 <div class="memitem">
175 <div class="memproto">
176 <table class="memname">
177 <tr>
178 <td class="memname">#define ucx_logger_debug</td>
179 <td>(</td>
180 <td class="paramtype">&#160;</td>
181 <td class="paramname">logger, </td>
182 </tr>
183 <tr>
184 <td class="paramkey"></td>
185 <td></td>
186 <td class="paramtype">&#160;</td>
187 <td class="paramname"><em>...</em>&#160;</td>
188 </tr>
189 <tr>
190 <td></td>
191 <td>)</td>
192 <td></td><td>&#160;&#160;&#160;<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>
193 </tr>
194 </table>
195 </div><div class="memdoc">
196
197 <p>Shortcut for logging a debug message. </p>
198 <dl class="params"><dt>Parameters</dt><dd>
199 <table class="params">
200 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
201 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
202 </table>
203 </dd>
204 </dl>
205 <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>
206
207 </div>
208 </div>
209 <a id="aa254c07fe3a907613e2256a318d5c9a8"></a>
210 <h2 class="memtitle"><span class="permalink"><a href="#aa254c07fe3a907613e2256a318d5c9a8">&#9670;&nbsp;</a></span>UCX_LOGGER_ERROR</h2>
211
212 <div class="memitem">
213 <div class="memproto">
214 <table class="memname">
215 <tr>
216 <td class="memname">#define UCX_LOGGER_ERROR&#160;&#160;&#160;0x00</td>
217 </tr>
218 </table>
219 </div><div class="memdoc">
220
221 <p>Log level for error messages. </p>
222
223 </div>
224 </div>
225 <a id="a6a9e472e14d6768e59d96d245e065397"></a>
226 <h2 class="memtitle"><span class="permalink"><a href="#a6a9e472e14d6768e59d96d245e065397">&#9670;&nbsp;</a></span>ucx_logger_error</h2>
227
228 <div class="memitem">
229 <div class="memproto">
230 <table class="memname">
231 <tr>
232 <td class="memname">#define ucx_logger_error</td>
233 <td>(</td>
234 <td class="paramtype">&#160;</td>
235 <td class="paramname">logger, </td>
236 </tr>
237 <tr>
238 <td class="paramkey"></td>
239 <td></td>
240 <td class="paramtype">&#160;</td>
241 <td class="paramname"><em>...</em>&#160;</td>
242 </tr>
243 <tr>
244 <td></td>
245 <td>)</td>
246 <td></td><td>&#160;&#160;&#160;<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>
247 </tr>
248 </table>
249 </div><div class="memdoc">
250
251 <p>Shortcut for logging an error message. </p>
252 <dl class="params"><dt>Parameters</dt><dd>
253 <table class="params">
254 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
255 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
256 </table>
257 </dd>
258 </dl>
259 <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>
260
261 </div>
262 </div>
263 <a id="a4b0178bf60a6129373ffc59114ca4c9b"></a>
264 <h2 class="memtitle"><span class="permalink"><a href="#a4b0178bf60a6129373ffc59114ca4c9b">&#9670;&nbsp;</a></span>UCX_LOGGER_INFO</h2>
265
266 <div class="memitem">
267 <div class="memproto">
268 <table class="memname">
269 <tr>
270 <td class="memname">#define UCX_LOGGER_INFO&#160;&#160;&#160;0x20</td>
271 </tr>
272 </table>
273 </div><div class="memdoc">
274
275 <p>Log level for information messages. </p>
276
277 </div>
278 </div>
279 <a id="a98464d8d51376ce2716dcc4eca00d5da"></a>
280 <h2 class="memtitle"><span class="permalink"><a href="#a98464d8d51376ce2716dcc4eca00d5da">&#9670;&nbsp;</a></span>ucx_logger_info</h2>
281
282 <div class="memitem">
283 <div class="memproto">
284 <table class="memname">
285 <tr>
286 <td class="memname">#define ucx_logger_info</td>
287 <td>(</td>
288 <td class="paramtype">&#160;</td>
289 <td class="paramname">logger, </td>
290 </tr>
291 <tr>
292 <td class="paramkey"></td>
293 <td></td>
294 <td class="paramtype">&#160;</td>
295 <td class="paramname"><em>...</em>&#160;</td>
296 </tr>
297 <tr>
298 <td></td>
299 <td>)</td>
300 <td></td><td>&#160;&#160;&#160;<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>
301 </tr>
302 </table>
303 </div><div class="memdoc">
304
305 <p>Shortcut for logging an information message. </p>
306 <dl class="params"><dt>Parameters</dt><dd>
307 <table class="params">
308 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
309 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
310 </table>
311 </dd>
312 </dl>
313 <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>
314
315 </div>
316 </div>
317 <a id="aee18bc20e58ffb69910121512c350839"></a>
318 <h2 class="memtitle"><span class="permalink"><a href="#aee18bc20e58ffb69910121512c350839">&#9670;&nbsp;</a></span>UCX_LOGGER_LEVEL</h2>
319
320 <div class="memitem">
321 <div class="memproto">
322 <table class="memname">
323 <tr>
324 <td class="memname">#define UCX_LOGGER_LEVEL&#160;&#160;&#160;0x01</td>
325 </tr>
326 </table>
327 </div><div class="memdoc">
328
329 <p>Output flag for the log level. </p>
330 <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>
331
332 </div>
333 </div>
334 <a id="aa0245325031d95799b28def177fd14ec"></a>
335 <h2 class="memtitle"><span class="permalink"><a href="#aa0245325031d95799b28def177fd14ec">&#9670;&nbsp;</a></span>ucx_logger_log</h2>
336
337 <div class="memitem">
338 <div class="memproto">
339 <table class="memname">
340 <tr>
341 <td class="memname">#define ucx_logger_log</td>
342 <td>(</td>
343 <td class="paramtype">&#160;</td>
344 <td class="paramname">logger, </td>
345 </tr>
346 <tr>
347 <td class="paramkey"></td>
348 <td></td>
349 <td class="paramtype">&#160;</td>
350 <td class="paramname">level, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">&#160;</td>
356 <td class="paramname"><em>...</em>&#160;</td>
357 </tr>
358 <tr>
359 <td></td>
360 <td>)</td>
361 <td></td><td>&#160;&#160;&#160;<a class="el" href="logging_8h.html#ac337e5d02ebea565012d4c11bd643801">ucx_logger_logf</a>(logger, level, __FILE__, __LINE__, __VA_ARGS__)</td>
362 </tr>
363 </table>
364 </div><div class="memdoc">
365
366 <p>Logs a message at the specified level. </p>
367 <dl class="params"><dt>Parameters</dt><dd>
368 <table class="params">
369 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
370 <tr><td class="paramname">level</td><td>the level to log the message on </td></tr>
371 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
372 </table>
373 </dd>
374 </dl>
375 <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>
376
377 </div>
378 </div>
379 <a id="a5cffc19502c4c90bfb3bd3bbcd18170a"></a>
380 <h2 class="memtitle"><span class="permalink"><a href="#a5cffc19502c4c90bfb3bd3bbcd18170a">&#9670;&nbsp;</a></span>ucx_logger_register_level</h2>
381
382 <div class="memitem">
383 <div class="memproto">
384 <table class="memname">
385 <tr>
386 <td class="memname">#define ucx_logger_register_level</td>
387 <td>(</td>
388 <td class="paramtype">&#160;</td>
389 <td class="paramname">logger, </td>
390 </tr>
391 <tr>
392 <td class="paramkey"></td>
393 <td></td>
394 <td class="paramtype">&#160;</td>
395 <td class="paramname">level, </td>
396 </tr>
397 <tr>
398 <td class="paramkey"></td>
399 <td></td>
400 <td class="paramtype">&#160;</td>
401 <td class="paramname">name&#160;</td>
402 </tr>
403 <tr>
404 <td></td>
405 <td>)</td>
406 <td></td><td></td>
407 </tr>
408 </table>
409 </div><div class="memdoc">
410 <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-&gt;levels, l, (<span class="keywordtype">void</span>*) <span class="stringliteral">&quot;[&quot;</span> name <span class="stringliteral">&quot;]&quot;</span>); \</div><div class="line"> } <span class="keywordflow">while</span> (0);</div></div><!-- fragment -->
411 <p>Registers a custom log level. </p>
412 <dl class="params"><dt>Parameters</dt><dd>
413 <table class="params">
414 <tr><td class="paramname">logger</td><td>the logger </td></tr>
415 <tr><td class="paramname">level</td><td>the log level as unsigned integer </td></tr>
416 <tr><td class="paramname">name</td><td>a string literal describing the level </td></tr>
417 </table>
418 </dd>
419 </dl>
420
421 </div>
422 </div>
423 <a id="a0e0d72b12616c1e49ff8834eaf4cb8a2"></a>
424 <h2 class="memtitle"><span class="permalink"><a href="#a0e0d72b12616c1e49ff8834eaf4cb8a2">&#9670;&nbsp;</a></span>UCX_LOGGER_SOURCE</h2>
425
426 <div class="memitem">
427 <div class="memproto">
428 <table class="memname">
429 <tr>
430 <td class="memname">#define UCX_LOGGER_SOURCE&#160;&#160;&#160;0x04</td>
431 </tr>
432 </table>
433 </div><div class="memdoc">
434
435 <p>Output flag for the source. </p>
436 <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>
437
438 </div>
439 </div>
440 <a id="a38607008268b4f776ee500fb95d2e823"></a>
441 <h2 class="memtitle"><span class="permalink"><a href="#a38607008268b4f776ee500fb95d2e823">&#9670;&nbsp;</a></span>UCX_LOGGER_TIMESTAMP</h2>
442
443 <div class="memitem">
444 <div class="memproto">
445 <table class="memname">
446 <tr>
447 <td class="memname">#define UCX_LOGGER_TIMESTAMP&#160;&#160;&#160;0x02</td>
448 </tr>
449 </table>
450 </div><div class="memdoc">
451
452 <p>Output flag for the timestmap. </p>
453 <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>
454
455 </div>
456 </div>
457 <a id="a55b88d1fec7036d841b3ddd6195c5586"></a>
458 <h2 class="memtitle"><span class="permalink"><a href="#a55b88d1fec7036d841b3ddd6195c5586">&#9670;&nbsp;</a></span>UCX_LOGGER_TRACE</h2>
459
460 <div class="memitem">
461 <div class="memproto">
462 <table class="memname">
463 <tr>
464 <td class="memname">#define UCX_LOGGER_TRACE&#160;&#160;&#160;0x40</td>
465 </tr>
466 </table>
467 </div><div class="memdoc">
468
469 <p>Log level for trace messages. </p>
470
471 </div>
472 </div>
473 <a id="a3031b7ff13f4cfae9c2916543be2877c"></a>
474 <h2 class="memtitle"><span class="permalink"><a href="#a3031b7ff13f4cfae9c2916543be2877c">&#9670;&nbsp;</a></span>ucx_logger_trace</h2>
475
476 <div class="memitem">
477 <div class="memproto">
478 <table class="memname">
479 <tr>
480 <td class="memname">#define ucx_logger_trace</td>
481 <td>(</td>
482 <td class="paramtype">&#160;</td>
483 <td class="paramname">logger, </td>
484 </tr>
485 <tr>
486 <td class="paramkey"></td>
487 <td></td>
488 <td class="paramtype">&#160;</td>
489 <td class="paramname"><em>...</em>&#160;</td>
490 </tr>
491 <tr>
492 <td></td>
493 <td>)</td>
494 <td></td><td>&#160;&#160;&#160;<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>
495 </tr>
496 </table>
497 </div><div class="memdoc">
498
499 <p>Shortcut for logging a trace message. </p>
500 <dl class="params"><dt>Parameters</dt><dd>
501 <table class="params">
502 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
503 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
504 </table>
505 </dd>
506 </dl>
507 <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>
508
509 </div>
510 </div>
511 <a id="abd01ca11486226ba34e8f7028d9fffba"></a>
512 <h2 class="memtitle"><span class="permalink"><a href="#abd01ca11486226ba34e8f7028d9fffba">&#9670;&nbsp;</a></span>UCX_LOGGER_WARN</h2>
513
514 <div class="memitem">
515 <div class="memproto">
516 <table class="memname">
517 <tr>
518 <td class="memname">#define UCX_LOGGER_WARN&#160;&#160;&#160;0x10</td>
519 </tr>
520 </table>
521 </div><div class="memdoc">
522
523 <p>Log level for warning messages. </p>
524
525 </div>
526 </div>
527 <a id="aca7bd861b646892813fd7310c0aa69af"></a>
528 <h2 class="memtitle"><span class="permalink"><a href="#aca7bd861b646892813fd7310c0aa69af">&#9670;&nbsp;</a></span>ucx_logger_warn</h2>
529
530 <div class="memitem">
531 <div class="memproto">
532 <table class="memname">
533 <tr>
534 <td class="memname">#define ucx_logger_warn</td>
535 <td>(</td>
536 <td class="paramtype">&#160;</td>
537 <td class="paramname">logger, </td>
538 </tr>
539 <tr>
540 <td class="paramkey"></td>
541 <td></td>
542 <td class="paramtype">&#160;</td>
543 <td class="paramname"><em>...</em>&#160;</td>
544 </tr>
545 <tr>
546 <td></td>
547 <td>)</td>
548 <td></td><td>&#160;&#160;&#160;<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>
549 </tr>
550 </table>
551 </div><div class="memdoc">
552
553 <p>Shortcut for logging a warning message. </p>
554 <dl class="params"><dt>Parameters</dt><dd>
555 <table class="params">
556 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
557 <tr><td class="paramname">...</td><td>format string and arguments </td></tr>
558 </table>
559 </dd>
560 </dl>
561 <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>
562
563 </div>
564 </div>
565 <h2 class="groupheader">Function Documentation</h2>
566 <a id="ac4697b784e01ec990d2acea192e21658"></a>
567 <h2 class="memtitle"><span class="permalink"><a href="#ac4697b784e01ec990d2acea192e21658">&#9670;&nbsp;</a></span>ucx_logger_free()</h2>
568
569 <div class="memitem">
570 <div class="memproto">
571 <table class="memname">
572 <tr>
573 <td class="memname">void ucx_logger_free </td>
574 <td>(</td>
575 <td class="paramtype"><a class="el" href="structUcxLogger.html">UcxLogger</a> *&#160;</td>
576 <td class="paramname"><em>logger</em></td><td>)</td>
577 <td></td>
578 </tr>
579 </table>
580 </div><div class="memdoc">
581
582 <p>Destroys the logger. </p>
583 <p>The map containing the valid log levels is also automatically destroyed.</p>
584 <dl class="params"><dt>Parameters</dt><dd>
585 <table class="params">
586 <tr><td class="paramname">logger</td><td>the logger to destroy </td></tr>
587 </table>
588 </dd>
589 </dl>
590
591 </div>
592 </div>
593 <a id="ac337e5d02ebea565012d4c11bd643801"></a>
594 <h2 class="memtitle"><span class="permalink"><a href="#ac337e5d02ebea565012d4c11bd643801">&#9670;&nbsp;</a></span>ucx_logger_logf()</h2>
595
596 <div class="memitem">
597 <div class="memproto">
598 <table class="memname">
599 <tr>
600 <td class="memname">void ucx_logger_logf </td>
601 <td>(</td>
602 <td class="paramtype"><a class="el" href="structUcxLogger.html">UcxLogger</a> *&#160;</td>
603 <td class="paramname"><em>logger</em>, </td>
604 </tr>
605 <tr>
606 <td class="paramkey"></td>
607 <td></td>
608 <td class="paramtype">unsigned int&#160;</td>
609 <td class="paramname"><em>level</em>, </td>
610 </tr>
611 <tr>
612 <td class="paramkey"></td>
613 <td></td>
614 <td class="paramtype">const char *&#160;</td>
615 <td class="paramname"><em>file</em>, </td>
616 </tr>
617 <tr>
618 <td class="paramkey"></td>
619 <td></td>
620 <td class="paramtype">const unsigned int&#160;</td>
621 <td class="paramname"><em>line</em>, </td>
622 </tr>
623 <tr>
624 <td class="paramkey"></td>
625 <td></td>
626 <td class="paramtype">const char *&#160;</td>
627 <td class="paramname"><em>format</em>, </td>
628 </tr>
629 <tr>
630 <td class="paramkey"></td>
631 <td></td>
632 <td class="paramtype">&#160;</td>
633 <td class="paramname"><em>...</em>&#160;</td>
634 </tr>
635 <tr>
636 <td></td>
637 <td>)</td>
638 <td></td><td></td>
639 </tr>
640 </table>
641 </div><div class="memdoc">
642
643 <p>Internal log function - use macros instead. </p>
644 <p>This function uses the <code>format</code> and variadic arguments for a printf()-style output of the log message.</p>
645 <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>
646 <p><code>[LEVEL] [TIMESTAMP] [SOURCEFILE]:[LINENO] message</code></p>
647 <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>
648 <dl class="params"><dt>Parameters</dt><dd>
649 <table class="params">
650 <tr><td class="paramname">logger</td><td>the logger to use </td></tr>
651 <tr><td class="paramname">level</td><td>the level to log on </td></tr>
652 <tr><td class="paramname">file</td><td>information about the source file </td></tr>
653 <tr><td class="paramname">line</td><td>information about the source line number </td></tr>
654 <tr><td class="paramname">format</td><td>format string </td></tr>
655 <tr><td class="paramname">...</td><td>arguments </td></tr>
656 </table>
657 </dd>
658 </dl>
659 <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>
660
661 </div>
662 </div>
663 <a id="ac560f8517d2172794c9d2691735ec48c"></a>
664 <h2 class="memtitle"><span class="permalink"><a href="#ac560f8517d2172794c9d2691735ec48c">&#9670;&nbsp;</a></span>ucx_logger_new()</h2>
665
666 <div class="memitem">
667 <div class="memproto">
668 <table class="memname">
669 <tr>
670 <td class="memname"><a class="el" href="structUcxLogger.html">UcxLogger</a>* ucx_logger_new </td>
671 <td>(</td>
672 <td class="paramtype">void *&#160;</td>
673 <td class="paramname"><em>stream</em>, </td>
674 </tr>
675 <tr>
676 <td class="paramkey"></td>
677 <td></td>
678 <td class="paramtype">unsigned int&#160;</td>
679 <td class="paramname"><em>level</em>, </td>
680 </tr>
681 <tr>
682 <td class="paramkey"></td>
683 <td></td>
684 <td class="paramtype">unsigned int&#160;</td>
685 <td class="paramname"><em>mask</em>&#160;</td>
686 </tr>
687 <tr>
688 <td></td>
689 <td>)</td>
690 <td></td><td></td>
691 </tr>
692 </table>
693 </div><div class="memdoc">
694
695 <p>Creates a new logger. </p>
696 <dl class="params"><dt>Parameters</dt><dd>
697 <table class="params">
698 <tr><td class="paramname">stream</td><td>the stream, which the logger shall write to </td></tr>
699 <tr><td class="paramname">level</td><td>the level on which the logger shall operate </td></tr>
700 <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>
701 </table>
702 </dd>
703 </dl>
704 <dl class="section return"><dt>Returns</dt><dd>a new logger object </dd></dl>
705
706 </div>
707 </div>
708 </div><!-- contents -->
709 <!-- start footer part -->
710 <hr class="footer"/><address class="footer"><small>
711 Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
712 <img class="footer" src="doxygen.png" alt="doxygen"/>
713 </a> 1.8.13
714 </small></address>
715 </body>
716 </html>

mercurial