123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>MQTT C Client Libraries Internals: Log.c 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="pahologo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">MQTT C Client Libraries Internals
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.17 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</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><!-- 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> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">Log.c File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Logging and tracing module.
- <a href="#details">More...</a></p>
- <div class="textblock"><code>#include "Log.h"</code><br />
- <code>#include "MQTTPacket.h"</code><br />
- <code>#include "MQTTProtocol.h"</code><br />
- <code>#include "MQTTProtocolClient.h"</code><br />
- <code>#include "Messages.h"</code><br />
- <code>#include "LinkedList.h"</code><br />
- <code>#include "StackTrace.h"</code><br />
- <code>#include "Thread.h"</code><br />
- <code>#include <stdio.h></code><br />
- <code>#include <stdlib.h></code><br />
- <code>#include <stdarg.h></code><br />
- <code>#include <time.h></code><br />
- <code>#include <string.h></code><br />
- <code>#include <syslog.h></code><br />
- <code>#include <sys/stat.h></code><br />
- <code>#include <sys/time.h></code><br />
- </div><div class="textblock"><div class="dynheader">
- Include dependency graph for Log.c:</div>
- <div class="dyncontent">
- <div class="center"><img src="Log_8c__incl.png" border="0" usemap="#Log_8c" alt=""/></div>
- <map name="Log_8c" id="Log_8c">
- <area shape="rect" title="Logging and tracing module." alt="" coords="312,5,367,32"/>
- <area shape="rect" title=" " alt="" coords="5,80,65,107"/>
- <area shape="rect" title=" " alt="" coords="89,80,152,107"/>
- <area shape="rect" title=" " alt="" coords="176,80,244,107"/>
- <area shape="rect" title=" " alt="" coords="268,80,325,107"/>
- <area shape="rect" title=" " alt="" coords="350,80,414,107"/>
- <area shape="rect" title=" " alt="" coords="438,80,507,107"/>
- <area shape="rect" title=" " alt="" coords="532,80,611,107"/>
- <area shape="rect" title=" " alt="" coords="635,80,716,107"/>
- </map>
- </div>
- </div><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="structtraceEntry.html">traceEntry</a></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:a3e885d7ac398dca6737f6f97443c634d"><td class="memItemLeft" align="right" valign="top"><a id="a3e885d7ac398dca6737f6f97443c634d"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>GETTIMEOFDAY</b>   1</td></tr>
- <tr class="separator:a3e885d7ac398dca6737f6f97443c634d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a411530253569ea29a964f13204da8848"><td class="memItemLeft" align="right" valign="top"><a id="a411530253569ea29a964f13204da8848"></a>
- #define </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#a411530253569ea29a964f13204da8848">_unlink</a>   unlink</td></tr>
- <tr class="memdesc:a411530253569ea29a964f13204da8848"><td class="mdescLeft"> </td><td class="mdescRight">_unlink mapping for linux <br /></td></tr>
- <tr class="separator:a411530253569ea29a964f13204da8848"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2d017cd3beb218080a7988e2deed2a11"><td class="memItemLeft" align="right" valign="top"><a id="a2d017cd3beb218080a7988e2deed2a11"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>min</b>(A, B)   ( (A) < (B) ? (A):(B))</td></tr>
- <tr class="separator:a2d017cd3beb218080a7988e2deed2a11"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa03fec699b0d6777b50d67d28c1393c0"><td class="memItemLeft" align="right" valign="top"><a id="aa03fec699b0d6777b50d67d28c1393c0"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>MAX_FUNCTION_NAME_LENGTH</b>   256</td></tr>
- <tr class="separator:aa03fec699b0d6777b50d67d28c1393c0"><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:ac89c9387d0e9288bcfb6bf4dbb318f0f"><td class="memItemLeft" align="right" valign="top"><a id="ac89c9387d0e9288bcfb6bf4dbb318f0f"></a>
- static <a class="el" href="structtraceEntry.html">traceEntry</a> * </td><td class="memItemRight" valign="bottom"><b>Log_pretrace</b> (void)</td></tr>
- <tr class="separator:ac89c9387d0e9288bcfb6bf4dbb318f0f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4e314957624cf3b68d92a3e7f444ab04"><td class="memItemLeft" align="right" valign="top"><a id="a4e314957624cf3b68d92a3e7f444ab04"></a>
- static char * </td><td class="memItemRight" valign="bottom"><b>Log_formatTraceEntry</b> (<a class="el" href="structtraceEntry.html">traceEntry</a> *cur_entry)</td></tr>
- <tr class="separator:a4e314957624cf3b68d92a3e7f444ab04"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa47715e2e98beab1500d99ff96801967"><td class="memItemLeft" align="right" valign="top"><a id="aa47715e2e98beab1500d99ff96801967"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>Log_output</b> (enum LOG_LEVELS log_level, const char *msg)</td></tr>
- <tr class="separator:aa47715e2e98beab1500d99ff96801967"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a34b3426c0bcb6fa60828a3aa57acc813"><td class="memItemLeft" align="right" valign="top"><a id="a34b3426c0bcb6fa60828a3aa57acc813"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>Log_posttrace</b> (enum LOG_LEVELS log_level, <a class="el" href="structtraceEntry.html">traceEntry</a> *cur_entry)</td></tr>
- <tr class="separator:a34b3426c0bcb6fa60828a3aa57acc813"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:afb7e2da77e4d84bba29f1e3e8d9b6b7b"><td class="memItemLeft" align="right" valign="top"><a id="afb7e2da77e4d84bba29f1e3e8d9b6b7b"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>Log_trace</b> (enum LOG_LEVELS log_level, const char *buf)</td></tr>
- <tr class="separator:afb7e2da77e4d84bba29f1e3e8d9b6b7b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a38c54bf09a6eb6d0298b96dea84c3d57"><td class="memItemLeft" align="right" valign="top"><a id="a38c54bf09a6eb6d0298b96dea84c3d57"></a>
- int </td><td class="memItemRight" valign="bottom"><b>Log_initialize</b> (<a class="el" href="structLog__nameValue.html">Log_nameValue</a> *info)</td></tr>
- <tr class="separator:a38c54bf09a6eb6d0298b96dea84c3d57"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8a3b9a6b2ed60bb8ee665393ace03f44"><td class="memItemLeft" align="right" valign="top"><a id="a8a3b9a6b2ed60bb8ee665393ace03f44"></a>
- void </td><td class="memItemRight" valign="bottom"><b>Log_setTraceCallback</b> (Log_traceCallback *callback)</td></tr>
- <tr class="separator:a8a3b9a6b2ed60bb8ee665393ace03f44"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:addcc3f16c3026d52110ec6b042dee777"><td class="memItemLeft" align="right" valign="top"><a id="addcc3f16c3026d52110ec6b042dee777"></a>
- void </td><td class="memItemRight" valign="bottom"><b>Log_setTraceLevel</b> (enum LOG_LEVELS level)</td></tr>
- <tr class="separator:addcc3f16c3026d52110ec6b042dee777"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a34bd95b8fd2503c48432f8e337020039"><td class="memItemLeft" align="right" valign="top"><a id="a34bd95b8fd2503c48432f8e337020039"></a>
- void </td><td class="memItemRight" valign="bottom"><b>Log_terminate</b> (void)</td></tr>
- <tr class="separator:a34bd95b8fd2503c48432f8e337020039"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a669722e3f57811871f97c12392aba85d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#a669722e3f57811871f97c12392aba85d">Log</a> (enum LOG_LEVELS log_level, int msgno, const char *format,...)</td></tr>
- <tr class="memdesc:a669722e3f57811871f97c12392aba85d"><td class="mdescLeft"> </td><td class="mdescRight">Log a message. <a href="Log_8c.html#a669722e3f57811871f97c12392aba85d">More...</a><br /></td></tr>
- <tr class="separator:a669722e3f57811871f97c12392aba85d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aeb93e137086d574a96548cecca9e9217"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#aeb93e137086d574a96548cecca9e9217">Log_stackTrace</a> (enum LOG_LEVELS log_level, int msgno, thread_id_type thread_id, int current_depth, const char *name, int line, int *rc)</td></tr>
- <tr class="memdesc:aeb93e137086d574a96548cecca9e9217"><td class="mdescLeft"> </td><td class="mdescRight">The reason for this function is to make trace logging as fast as possible so that the function exit/entry history can be captured by default without unduly impacting performance. <a href="Log_8c.html#aeb93e137086d574a96548cecca9e9217">More...</a><br /></td></tr>
- <tr class="separator:aeb93e137086d574a96548cecca9e9217"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:a4a51e66471ed77f167e992aaecf1a7c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structtrace__settings__type.html">trace_settings_type</a> </td><td class="memItemRight" valign="bottom"><b>trace_settings</b></td></tr>
- <tr class="separator:a4a51e66471ed77f167e992aaecf1a7c7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a559a1d26d36ec391d98bca4d3aa9be0e"><td class="memItemLeft" align="right" valign="top"><a id="a559a1d26d36ec391d98bca4d3aa9be0e"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>start_index</b> = -1</td></tr>
- <tr class="separator:a559a1d26d36ec391d98bca4d3aa9be0e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a720939920b71c9d9f9410359151d8224"><td class="memItemLeft" align="right" valign="top"><a id="a720939920b71c9d9f9410359151d8224"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>next_index</b> = 0</td></tr>
- <tr class="separator:a720939920b71c9d9f9410359151d8224"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0ddc2d22fc8cc3965883229c95b53e78"><td class="memItemLeft" align="right" valign="top"><a id="a0ddc2d22fc8cc3965883229c95b53e78"></a>
- static <a class="el" href="structtraceEntry.html">traceEntry</a> * </td><td class="memItemRight" valign="bottom"><b>trace_queue</b> = NULL</td></tr>
- <tr class="separator:a0ddc2d22fc8cc3965883229c95b53e78"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af1c4f504f3e58f60dc3a0e84978f7f67"><td class="memItemLeft" align="right" valign="top"><a id="af1c4f504f3e58f60dc3a0e84978f7f67"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>trace_queue_size</b> = 0</td></tr>
- <tr class="separator:af1c4f504f3e58f60dc3a0e84978f7f67"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a29606f1185cb957cd23842125d7d8ecd"><td class="memItemLeft" align="right" valign="top"><a id="a29606f1185cb957cd23842125d7d8ecd"></a>
- static FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#a29606f1185cb957cd23842125d7d8ecd">trace_destination</a> = NULL</td></tr>
- <tr class="memdesc:a29606f1185cb957cd23842125d7d8ecd"><td class="mdescLeft"> </td><td class="mdescRight">flag to indicate if trace is to be sent to a stream <br /></td></tr>
- <tr class="separator:a29606f1185cb957cd23842125d7d8ecd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa46cc371a2f34c92be9e5df8ac162566"><td class="memItemLeft" align="right" valign="top"><a id="aa46cc371a2f34c92be9e5df8ac162566"></a>
- static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#aa46cc371a2f34c92be9e5df8ac162566">trace_destination_name</a> = NULL</td></tr>
- <tr class="memdesc:aa46cc371a2f34c92be9e5df8ac162566"><td class="mdescLeft"> </td><td class="mdescRight">the name of the trace file <br /></td></tr>
- <tr class="separator:aa46cc371a2f34c92be9e5df8ac162566"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6e2c5a6602ec82079f7b7c3c1a622f8a"><td class="memItemLeft" align="right" valign="top"><a id="a6e2c5a6602ec82079f7b7c3c1a622f8a"></a>
- static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#a6e2c5a6602ec82079f7b7c3c1a622f8a">trace_destination_backup_name</a> = NULL</td></tr>
- <tr class="memdesc:a6e2c5a6602ec82079f7b7c3c1a622f8a"><td class="mdescLeft"> </td><td class="mdescRight">the name of the backup trace file <br /></td></tr>
- <tr class="separator:a6e2c5a6602ec82079f7b7c3c1a622f8a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af6d2621ee2d6d01ab6b42b9afbc1c56e"><td class="memItemLeft" align="right" valign="top"><a id="af6d2621ee2d6d01ab6b42b9afbc1c56e"></a>
- static int </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#af6d2621ee2d6d01ab6b42b9afbc1c56e">lines_written</a> = 0</td></tr>
- <tr class="memdesc:af6d2621ee2d6d01ab6b42b9afbc1c56e"><td class="mdescLeft"> </td><td class="mdescRight">number of lines written to the current output file <br /></td></tr>
- <tr class="separator:af6d2621ee2d6d01ab6b42b9afbc1c56e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab0c0e8addd9dc5b2a54aafa15b606435"><td class="memItemLeft" align="right" valign="top"><a id="ab0c0e8addd9dc5b2a54aafa15b606435"></a>
- static int </td><td class="memItemRight" valign="bottom"><a class="el" href="Log_8c.html#ab0c0e8addd9dc5b2a54aafa15b606435">max_lines_per_file</a> = 1000</td></tr>
- <tr class="memdesc:ab0c0e8addd9dc5b2a54aafa15b606435"><td class="mdescLeft"> </td><td class="mdescRight">maximum number of lines to write to one trace file <br /></td></tr>
- <tr class="separator:ab0c0e8addd9dc5b2a54aafa15b606435"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1505e282df45cd7e0e0570a2830f4574"><td class="memItemLeft" align="right" valign="top"><a id="a1505e282df45cd7e0e0570a2830f4574"></a>
- static enum LOG_LEVELS </td><td class="memItemRight" valign="bottom"><b>trace_output_level</b> = INVALID_LEVEL</td></tr>
- <tr class="separator:a1505e282df45cd7e0e0570a2830f4574"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3f8afd46f428fa36804af822bfb0b01b"><td class="memItemLeft" align="right" valign="top"><a id="a3f8afd46f428fa36804af822bfb0b01b"></a>
- static Log_traceCallback * </td><td class="memItemRight" valign="bottom"><b>trace_callback</b> = NULL</td></tr>
- <tr class="separator:a3f8afd46f428fa36804af822bfb0b01b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8fb2059e64a46fb559e978427def3518"><td class="memItemLeft" align="right" valign="top"><a id="a8fb2059e64a46fb559e978427def3518"></a>
- static int </td><td class="memItemRight" valign="bottom"><b>sametime_count</b> = 0</td></tr>
- <tr class="separator:a8fb2059e64a46fb559e978427def3518"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aca38e8f36fc371eb9fc8f2839ec28130"><td class="memItemLeft" align="right" valign="top"><a id="aca38e8f36fc371eb9fc8f2839ec28130"></a>
- struct timeval now_ts </td><td class="memItemRight" valign="bottom"><b>last_ts</b></td></tr>
- <tr class="separator:aca38e8f36fc371eb9fc8f2839ec28130"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0edda13b46be84257a7de2779aeaf481"><td class="memItemLeft" align="right" valign="top"><a id="a0edda13b46be84257a7de2779aeaf481"></a>
- static char </td><td class="memItemRight" valign="bottom"><b>msg_buf</b> [512]</td></tr>
- <tr class="separator:a0edda13b46be84257a7de2779aeaf481"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a551c121ca3931d4af92f85a8f9cf0cd5"><td class="memItemLeft" align="right" valign="top"><a id="a551c121ca3931d4af92f85a8f9cf0cd5"></a>
- static pthread_mutex_t </td><td class="memItemRight" valign="bottom"><b>log_mutex_store</b> = PTHREAD_MUTEX_INITIALIZER</td></tr>
- <tr class="separator:a551c121ca3931d4af92f85a8f9cf0cd5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1d8e166556a1a6c79cb76e7004c1beca"><td class="memItemLeft" align="right" valign="top"><a id="a1d8e166556a1a6c79cb76e7004c1beca"></a>
- static mutex_type </td><td class="memItemRight" valign="bottom"><b>log_mutex</b> = &log_mutex_store</td></tr>
- <tr class="separator:a1d8e166556a1a6c79cb76e7004c1beca"><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 and tracing module. </p>
- </div><h2 class="groupheader">Function Documentation</h2>
- <a id="a669722e3f57811871f97c12392aba85d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a669722e3f57811871f97c12392aba85d">◆ </a></span>Log()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void Log </td>
- <td>(</td>
- <td class="paramtype">enum LOG_LEVELS </td>
- <td class="paramname"><em>log_level</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>msgno</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>Log a message. </p>
- <p>If possible, all messages should be indexed by message number, and the use of the format string should be minimized or negated altogether. If format is provided, the message number is only used as a message label. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">log_level</td><td>the log level of the message </td></tr>
- <tr><td class="paramname">msgno</td><td>the id of the message to use if the format string is NULL </td></tr>
- <tr><td class="paramname">aFormat</td><td>the printf format string to be used if the message id does not exist </td></tr>
- <tr><td class="paramname">...</td><td>the printf inserts </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="aeb93e137086d574a96548cecca9e9217"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aeb93e137086d574a96548cecca9e9217">◆ </a></span>Log_stackTrace()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void Log_stackTrace </td>
- <td>(</td>
- <td class="paramtype">enum LOG_LEVELS </td>
- <td class="paramname"><em>log_level</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>msgno</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">thread_id_type </td>
- <td class="paramname"><em>thread_id</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>current_depth</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>name</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>line</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int * </td>
- <td class="paramname"><em>rc</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>The reason for this function is to make trace logging as fast as possible so that the function exit/entry history can be captured by default without unduly impacting performance. </p>
- <p>Therefore it must do as little as possible. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">log_level</td><td>the log level of the message </td></tr>
- <tr><td class="paramname">msgno</td><td>the id of the message to use if the format string is NULL </td></tr>
- <tr><td class="paramname">aFormat</td><td>the printf format string to be used if the message id does not exist </td></tr>
- <tr><td class="paramname">...</td><td>the printf inserts </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a id="a4a51e66471ed77f167e992aaecf1a7c7"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4a51e66471ed77f167e992aaecf1a7c7">◆ </a></span>trace_settings</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structtrace__settings__type.html">trace_settings_type</a> trace_settings</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Initial value:</b><div class="fragment"><div class="line">=</div>
- <div class="line">{</div>
- <div class="line"> </div>
- <div class="line"> </div>
- <div class="line"> </div>
- <div class="line"> TRACE_MINIMUM,</div>
- <div class="line"> </div>
- <div class="line"> 400,</div>
- <div class="line"> INVALID_LEVEL</div>
- <div class="line">}</div>
- </div><!-- fragment -->
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.17
- </small></address>
- </body>
- </html>
|