123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <!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.10"/>
- <title>CoffeePi: logger.cpp 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>
- <script type="text/javascript">
- $(document).ready(function() { init_search(); });
- </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="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">CoffeePi
- </div>
- <div id="projectbrief">Coffee machine control for Raspberry Pi</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.10 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="files.html"><span>File List</span></a></li>
- <li><a href="globals.html"><span>Globals</span></a></li>
- </ul>
- </div>
- <!-- 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="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">logger.cpp File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <div class="textblock"><code>#include <stdio.h></code><br />
- <code>#include <stdarg.h></code><br />
- <code>#include <time.h></code><br />
- <code>#include "<a class="el" href="global_8h_source.html">global.h</a>"</code><br />
- <code>#include "<a class="el" href="logger_8h_source.html">logger.h</a>"</code><br />
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:aeb33ace0bb24787befc4a34c561634b4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#aeb33ace0bb24787befc4a34c561634b4">logger_print_time</a> (_IO_FILE *stream)</td></tr>
- <tr class="memdesc:aeb33ace0bb24787befc4a34c561634b4"><td class="mdescLeft"> </td><td class="mdescRight">Prints a timestamp. <a href="#aeb33ace0bb24787befc4a34c561634b4">More...</a><br /></td></tr>
- <tr class="separator:aeb33ace0bb24787befc4a34c561634b4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab5a2104bf520b79d590c6ef11cdeeb02"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#ab5a2104bf520b79d590c6ef11cdeeb02">logger_error</a> (const char *format,...)</td></tr>
- <tr class="memdesc:ab5a2104bf520b79d590c6ef11cdeeb02"><td class="mdescLeft"> </td><td class="mdescRight">Outputs the printf like formatted message to stderr and colorizes it. <a href="#ab5a2104bf520b79d590c6ef11cdeeb02">More...</a><br /></td></tr>
- <tr class="separator:ab5a2104bf520b79d590c6ef11cdeeb02"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abd01f221b7a194e67bb39d88822c9772"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#abd01f221b7a194e67bb39d88822c9772">logger_reset</a> ()</td></tr>
- <tr class="memdesc:abd01f221b7a194e67bb39d88822c9772"><td class="mdescLeft"> </td><td class="mdescRight">Resets the logger to prevent the previous line being overdrawn. <a href="#abd01f221b7a194e67bb39d88822c9772">More...</a><br /></td></tr>
- <tr class="separator:abd01f221b7a194e67bb39d88822c9772"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1f2dbdf600d66c1c1bcc820d0282d132"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#a1f2dbdf600d66c1c1bcc820d0282d132">logger</a> (<a class="el" href="logger_8h.html#a1cfb4eb1363ea2e4d18f9052a7a98131">logger_verbose_t</a> verboselevel, <a class="el" href="logger_8h.html#a60cbc432422370d29ed1b783be884823">logger_type_t</a> logtype, const char *format,...)</td></tr>
- <tr class="memdesc:a1f2dbdf600d66c1c1bcc820d0282d132"><td class="mdescLeft"> </td><td class="mdescRight">prints the message to stdout and formats it <a href="#a1f2dbdf600d66c1c1bcc820d0282d132">More...</a><br /></td></tr>
- <tr class="separator:a1f2dbdf600d66c1c1bcc820d0282d132"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad6ed0024f33524ff5e96b473a18b44fd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#ad6ed0024f33524ff5e96b473a18b44fd">logger</a> (<a class="el" href="logger_8h.html#a1cfb4eb1363ea2e4d18f9052a7a98131">logger_verbose_t</a> verboselevel, const char *format,...)</td></tr>
- <tr class="memdesc:ad6ed0024f33524ff5e96b473a18b44fd"><td class="mdescLeft"> </td><td class="mdescRight">prints the message to stdout <a href="#ad6ed0024f33524ff5e96b473a18b44fd">More...</a><br /></td></tr>
- <tr class="separator:ad6ed0024f33524ff5e96b473a18b44fd"><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:a05db4cbb4a1c322f0adebb466081c99e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="logger_8cpp.html#a05db4cbb4a1c322f0adebb466081c99e">lastlog</a> = 0</td></tr>
- <tr class="separator:a05db4cbb4a1c322f0adebb466081c99e"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="a1f2dbdf600d66c1c1bcc820d0282d132"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void logger </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="logger_8h.html#a1cfb4eb1363ea2e4d18f9052a7a98131">logger_verbose_t</a> </td>
- <td class="paramname"><em>verboselevel</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="logger_8h.html#a60cbc432422370d29ed1b783be884823">logger_type_t</a> </td>
- <td class="paramname"><em>logtype</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>prints the message to stdout and formats it </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">verboselevel</td><td>minimum verbose level for output </td></tr>
- <tr><td class="paramname">logtype</td><td>type of logmessage for coloring </td></tr>
- <tr><td class="paramname">format</td><td>printf formatted string </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ad6ed0024f33524ff5e96b473a18b44fd"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void logger </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="logger_8h.html#a1cfb4eb1363ea2e4d18f9052a7a98131">logger_verbose_t</a> </td>
- <td class="paramname"><em>verboselevel</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>prints the message to stdout </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">verboselevel</td><td>minimum verbose level for output </td></tr>
- <tr><td class="paramname">format</td><td>printf formatted string </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ab5a2104bf520b79d590c6ef11cdeeb02"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void logger_error </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>Outputs the printf like formatted message to stderr and colorizes it. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">format</td><td>printf formatted string </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="aeb33ace0bb24787befc4a34c561634b4"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void logger_print_time </td>
- <td>(</td>
- <td class="paramtype">_IO_FILE * </td>
- <td class="paramname"><em>stream</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Prints a timestamp. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">stream</td><td>target stream (stdout, stderr) </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="abd01f221b7a194e67bb39d88822c9772"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void logger_reset </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Resets the logger to prevent the previous line being overdrawn. </p>
- <p>Call after custom printf </p>
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a class="anchor" id="a05db4cbb4a1c322f0adebb466081c99e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int lastlog = 0</td>
- </tr>
- </table>
- </div><div class="memdoc">
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.10
- </small></address>
- </body>
- </html>
|