This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
speedclock/Arduino_Libs/Arduino-logging-library-master/doc/html/class_logging.html

451 lines
20 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Logging: Logging Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Logging Class Reference</h1><!-- doxytag: class="Logging" --><code>#include &lt;<a class="el" href="_logging_8h-source.html">Logging.h</a>&gt;</code>
<p>
<p>
<a href="class_logging-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#cc3d848a3d05076fd185cd95e9c648d5">Logging</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#f6a890a6feac5bf93b04cb22db7bd530">Init</a> (int level, long baud)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#1cf44ab531c72761fba811882336a2ad">Error</a> (char *msg,...)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#8a99e1a55e2b24d864d89e9aa86b2f2e">Info</a> (char *msg,...)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#e0fcd9e5350d7b9158c8ae9289fef193">Debug</a> (char *msg,...)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#2ae6a981ea685c851b87cf4c1ec2fb8f">Verbose</a> (char *msg,...)</td></tr>
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#714840794950ab31df5da5b95322e391">print</a> (const char *format, va_list args)</td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#117105f639285ba5922836121294c04a">_level</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_logging.html#8a2fe833b6e957b763146c32d6be5f2d">_baud</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="class_logging.html">Logging</a> is a helper class to output informations over RS232. If you know log4j or log4net, this logging class is more or less similar ;-) <br>
Different loglevels can be used to extend or reduce output All methods are able to handle any number of output parameters. All methods print out a formated string (like printf).<br>
To reduce output and program size, reduce loglevel. <br>
Output format string can contain below wildcards. Every wildcard must be start with percent sign (%)<p>
<b>Depending on loglevel, source code is excluded from compile !</b><br>
<br>
<b>Wildcards</b><br>
<ul>
<li>
<b>%s</b> replace with an string (char*) </li>
<li>
<b>%c</b> replace with an character </li>
<li>
<b>%d</b> replace with an integer value </li>
<li>
<b>%l</b> replace with an long value </li>
<li>
<b>%x</b> replace and convert integer value into hex </li>
<li>
<b>%X</b> like x but combine with <b>0x</b>123AB </li>
<li>
<b>%b</b> replace and convert integer value into binary </li>
<li>
<b>%B</b> like x but combine with <b>0b</b>10100011 </li>
<li>
<b>%t</b> replace and convert boolean value into <b>"t"</b> or <b>"f"</b> </li>
<li>
<b>%T</b> like t but convert into <b>"true"</b> or <b>"false"</b> </li>
</ul>
<br>
<b>Loglevels</b><br>
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<td>0</td><td>LOG_LEVEL_NOOUTPUT</td><td>no output </td></tr>
<tr>
<td>1</td><td>LOG_LEVEL_ERRORS</td><td>only errors </td></tr>
<tr>
<td>2</td><td>LOG_LEVEL_INFOS</td><td>errors and info </td></tr>
<tr>
<td>3</td><td>LOG_LEVEL_DEBUG</td><td>errors, info and debug </td></tr>
<tr>
<td>4</td><td>LOG_LEVEL_VERBOSE</td><td>all </td></tr>
</table>
<br>
<h1>History</h1>
<p>
<br>
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<td>01 FEB 2012</td><td>initial release </td></tr>
<tr>
<td>06 MAR 2012</td><td>implement a preinstanciate object (like in Wire, ...) </td></tr>
<tr>
<td></td><td>methode init get now loglevel and baud parameter </td></tr>
</table>
<p>Definition at line <a class="el" href="_logging_8h-source.html#l00071">71</a> of file <a class="el" href="_logging_8h-source.html">Logging.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="cc3d848a3d05076fd185cd95e9c648d5"></a><!-- doxytag: member="Logging::Logging" ref="cc3d848a3d05076fd185cd95e9c648d5" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Logging::Logging </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
default Constructor
<p>Definition at line <a class="el" href="_logging_8h-source.html#l00079">79</a> of file <a class="el" href="_logging_8h-source.html">Logging.h</a>.</p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="f6a890a6feac5bf93b04cb22db7bd530"></a><!-- doxytag: member="Logging::Init" ref="f6a890a6feac5bf93b04cb22db7bd530" args="(int level, long baud)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::Init </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>level</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long&nbsp;</td>
<td class="paramname"> <em>baud</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Initializing, must be called as first. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>void</em>&nbsp;</td><td></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00003">3</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>References <a class="el" href="_logging_8h-source.html#l00074">_baud</a>, <a class="el" href="_logging_8h-source.html#l00073">_level</a>, <a class="el" href="_logging_8h-source.html#l00016">LOG_LEVEL_NOOUTPUT</a>, and <a class="el" href="_logging_8h-source.html#l00020">LOG_LEVEL_VERBOSE</a>.</p>
</div>
</div><p>
<a class="anchor" name="1cf44ab531c72761fba811882336a2ad"></a><!-- doxytag: member="Logging::Error" ref="1cf44ab531c72761fba811882336a2ad" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::Error </td>
<td>(</td>
<td class="paramtype">char *&nbsp;</td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"> <em>...</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Output an error message. Output message contains ERROR: followed by original msg Error messages are printed out, at every loglevel except 0 ;-) <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>format string to output </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>any number of variables </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00009">9</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>References <a class="el" href="_logging_8h-source.html#l00073">_level</a>, <a class="el" href="_logging_8h-source.html#l00017">LOG_LEVEL_ERRORS</a>, and <a class="el" href="_logging_8cpp-source.html#l00046">print()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="class_logging_1cf44ab531c72761fba811882336a2ad_cgraph.png" border="0" usemap="#class_logging_1cf44ab531c72761fba811882336a2ad_cgraph_map" alt=""></center>
<map name="class_logging_1cf44ab531c72761fba811882336a2ad_cgraph_map">
<area shape="rect" id="node3" href="class_logging.html#714840794950ab31df5da5b95322e391" title="Logging::print" alt="" coords="159,5,257,35"> </map>
</div>
</div>
</div><p>
<a class="anchor" name="8a99e1a55e2b24d864d89e9aa86b2f2e"></a><!-- doxytag: member="Logging::Info" ref="8a99e1a55e2b24d864d89e9aa86b2f2e" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::Info </td>
<td>(</td>
<td class="paramtype">char *&nbsp;</td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"> <em>...</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Output an info message. Output message contains Info messages are printed out at l loglevels &gt;= LOG_LEVEL_INFOS<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>format string to output </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>any number of variables </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00019">19</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>References <a class="el" href="_logging_8h-source.html#l00073">_level</a>, <a class="el" href="_logging_8h-source.html#l00018">LOG_LEVEL_INFOS</a>, and <a class="el" href="_logging_8cpp-source.html#l00046">print()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="class_logging_8a99e1a55e2b24d864d89e9aa86b2f2e_cgraph.png" border="0" usemap="#class_logging_8a99e1a55e2b24d864d89e9aa86b2f2e_cgraph_map" alt=""></center>
<map name="class_logging_8a99e1a55e2b24d864d89e9aa86b2f2e_cgraph_map">
<area shape="rect" id="node3" href="class_logging.html#714840794950ab31df5da5b95322e391" title="Logging::print" alt="" coords="151,5,249,35"> </map>
</div>
</div>
</div><p>
<a class="anchor" name="e0fcd9e5350d7b9158c8ae9289fef193"></a><!-- doxytag: member="Logging::Debug" ref="e0fcd9e5350d7b9158c8ae9289fef193" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::Debug </td>
<td>(</td>
<td class="paramtype">char *&nbsp;</td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"> <em>...</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Output an debug message. Output message contains Debug messages are printed out at l loglevels &gt;= LOG_LEVEL_DEBUG<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>format string to output </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>any number of variables </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00027">27</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>References <a class="el" href="_logging_8h-source.html#l00073">_level</a>, <a class="el" href="_logging_8h-source.html#l00019">LOG_LEVEL_DEBUG</a>, and <a class="el" href="_logging_8cpp-source.html#l00046">print()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="class_logging_e0fcd9e5350d7b9158c8ae9289fef193_cgraph.png" border="0" usemap="#class_logging_e0fcd9e5350d7b9158c8ae9289fef193_cgraph_map" alt=""></center>
<map name="class_logging_e0fcd9e5350d7b9158c8ae9289fef193_cgraph_map">
<area shape="rect" id="node3" href="class_logging.html#714840794950ab31df5da5b95322e391" title="Logging::print" alt="" coords="167,5,265,35"> </map>
</div>
</div>
</div><p>
<a class="anchor" name="2ae6a981ea685c851b87cf4c1ec2fb8f"></a><!-- doxytag: member="Logging::Verbose" ref="2ae6a981ea685c851b87cf4c1ec2fb8f" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::Verbose </td>
<td>(</td>
<td class="paramtype">char *&nbsp;</td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"> <em>...</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Output an verbose message. Output message contains Debug messages are printed out at l loglevels &gt;= LOG_LEVEL_VERBOSE<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>format string to output </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>any number of variables </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00036">36</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>References <a class="el" href="_logging_8h-source.html#l00073">_level</a>, <a class="el" href="_logging_8h-source.html#l00020">LOG_LEVEL_VERBOSE</a>, and <a class="el" href="_logging_8cpp-source.html#l00046">print()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="class_logging_2ae6a981ea685c851b87cf4c1ec2fb8f_cgraph.png" border="0" usemap="#class_logging_2ae6a981ea685c851b87cf4c1ec2fb8f_cgraph_map" alt=""></center>
<map name="class_logging_2ae6a981ea685c851b87cf4c1ec2fb8f_cgraph_map">
<area shape="rect" id="node3" href="class_logging.html#714840794950ab31df5da5b95322e391" title="Logging::print" alt="" coords="177,5,276,35"> </map>
</div>
</div>
</div><p>
<a class="anchor" name="714840794950ab31df5da5b95322e391"></a><!-- doxytag: member="Logging::print" ref="714840794950ab31df5da5b95322e391" args="(const char *format, va_list args)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Logging::print </td>
<td>(</td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">va_list&nbsp;</td>
<td class="paramname"> <em>args</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [private]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="_logging_8cpp-source.html#l00046">46</a> of file <a class="el" href="_logging_8cpp-source.html">Logging.cpp</a>.</p>
<p>Referenced by <a class="el" href="_logging_8cpp-source.html#l00027">Debug()</a>, <a class="el" href="_logging_8cpp-source.html#l00009">Error()</a>, <a class="el" href="_logging_8cpp-source.html#l00019">Info()</a>, and <a class="el" href="_logging_8cpp-source.html#l00036">Verbose()</a>.</p>
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="117105f639285ba5922836121294c04a"></a><!-- doxytag: member="Logging::_level" ref="117105f639285ba5922836121294c04a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_logging.html#117105f639285ba5922836121294c04a">Logging::_level</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="_logging_8h-source.html#l00073">73</a> of file <a class="el" href="_logging_8h-source.html">Logging.h</a>.</p>
<p>Referenced by <a class="el" href="_logging_8cpp-source.html#l00027">Debug()</a>, <a class="el" href="_logging_8cpp-source.html#l00009">Error()</a>, <a class="el" href="_logging_8cpp-source.html#l00019">Info()</a>, <a class="el" href="_logging_8cpp-source.html#l00003">Init()</a>, and <a class="el" href="_logging_8cpp-source.html#l00036">Verbose()</a>.</p>
</div>
</div><p>
<a class="anchor" name="8a2fe833b6e957b763146c32d6be5f2d"></a><!-- doxytag: member="Logging::_baud" ref="8a2fe833b6e957b763146c32d6be5f2d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long <a class="el" href="class_logging.html#8a2fe833b6e957b763146c32d6be5f2d">Logging::_baud</a><code> [private]</code> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>Definition at line <a class="el" href="_logging_8h-source.html#l00074">74</a> of file <a class="el" href="_logging_8h-source.html">Logging.h</a>.</p>
<p>Referenced by <a class="el" href="_logging_8cpp-source.html#l00003">Init()</a>.</p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>K:/Projekte/robotic/arduino/arduino_1-0Patch/libraries/Logging/<a class="el" href="_logging_8h-source.html">Logging.h</a><li>K:/Projekte/robotic/arduino/arduino_1-0Patch/libraries/Logging/<a class="el" href="_logging_8cpp-source.html">Logging.cpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 6 20:17:24 2012 for Logging by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>