⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classlogger.html

📁 仿真人工智能是指用人工的方法和技术
💻 HTML
📖 第 1 页 / 共 3 页
字号:
      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method can be used to log information. Only when the specified level of the message lies in the range (iMinLogLevel..iMaxLogLevel) the information is logged. This method receives a character string that may contain format specifiers that are also available to 'printf' (like d, f, etc.). The remaining arguments are the variables that have to be filled in at the location of the specifiers. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>iLevel</em>&nbsp;</td><td>level corresponding to this message </td></tr><tr><td valign=top><em>str</em>&nbsp;</td><td>character string with (possible) format specifiers </td></tr><tr><td valign=top><em>...</em>&nbsp;</td><td>variables that define the values of the specifiers. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the message was logged or not. </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00103">103</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8h-source.html#l00097">buf</a>, <a class="el" href="Logger_8C-source.html#l00169">isInLogLevel</a>(), <a class="el" href="Logger_8h-source.html#l00102">os</a>, and <a class="el" href="Logger_8h-source.html#l00101">strHeader</a>.    </td>  </tr></table><a name="a1" doxytag="Logger::log"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Logger::log </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>iLevel</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>string&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>str</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method can be used to log information. Only when the specified level of the message lies in the range (iMinLogLevel..iMaxLogLevel) the information is logged. This method receives a a normal string <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>iLevel</em>&nbsp;</td><td>level corresponding to this message </td></tr><tr><td valign=top><em>str</em>&nbsp;</td><td>string that is logged when iLevel lies in the range </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the message was logged or not. </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00082">82</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8C-source.html#l00169">isInLogLevel</a>(), <a class="el" href="Logger_8h-source.html#l00102">os</a>, and <a class="el" href="Logger_8h-source.html#l00101">strHeader</a>.<p>Referenced by <a class="el" href="Connection_8C-source.html#l00072">Connection::Connection</a>().    </td>  </tr></table><a name="a3" doxytag="Logger::logWithTime"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Logger::logWithTime </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>iLevel</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>char *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>str</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>...&nbsp;</td>          <td class="mdname" nowrap>&nbsp;</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method can be used to log information. Only when the specified level of the message lies in the range (iMinLogLevel..iMaxLogLevel) the information is logged. This method receives a character string that may contain format specifiers that are also available to 'printf' (like d, f, etc.). The remaining arguments are the variables that have to be filled in at the location of the specifiers. Before the logged message the elapsed time since the timer has been restarted is printed. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>iLevel</em>&nbsp;</td><td>level corresponding to this message </td></tr><tr><td valign=top><em>str</em>&nbsp;</td><td>character string with (possible) format specifiers </td></tr><tr><td valign=top><em>...</em>&nbsp;</td><td>variables that define the values of the specifiers. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the message was logged or not. </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00134">134</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8h-source.html#l00097">buf</a>, <a class="el" href="Logger_8C-source.html#l00169">isInLogLevel</a>(), <a class="el" href="Logger_8h-source.html#l00102">os</a>, <a class="el" href="Logger_8C-source.html#l00293">Timing::printTimeDiffWithText</a>(), <a class="el" href="Logger_8h-source.html#l00101">strHeader</a>, and <a class="el" href="Logger_8h-source.html#l00096">timing</a>.    </td>  </tr></table><a name="a4" doxytag="Logger::restartTimer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void Logger::restartTimer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method restarts the timer associated with this Logger. <p>Definition at line <a class="el" href="Logger_8C-source.html#l00159">159</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8C-source.html#l00310">Timing::restartTime</a>(), and <a class="el" href="Logger_8h-source.html#l00096">timing</a>.<p>Referenced by <a class="el" href="main_8C-source.html#l00059">main</a>().    </td>  </tr></table><a name="a11" doxytag="Logger::setExtraLogLevel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Logger::setExtraLogLevel </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iLevel</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method sets the maximal log level. Message with a level that are higher this value are ignored when they are logged. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>iLevel</em>&nbsp;</td><td>new maximal log level. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the update was succesfull </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00223">223</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8h-source.html#l00100">iExtraLogLevel</a>.    </td>  </tr></table><a name="a14" doxytag="Logger::setHeader"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Logger::setHeader </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>i1</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>i2</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method sets the header that is written before the actual text that has to be logged. The header is represented by two integers which are written between parentheses. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>i1</em>&nbsp;</td><td>first integer </td></tr><tr><td valign=top><em>i2</em>&nbsp;</td><td>second integer </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the update was succesfull </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00255">255</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8h-source.html#l00101">strHeader</a>.    </td>  </tr></table><a name="a13" doxytag="Logger::setHeader"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool Logger::setHeader </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>str</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>This method sets the header that is written before the actual text that has to be logged. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em>&nbsp;</td><td>that represents the character string </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>bool indicating whether the update was succesfull </dl><p>Definition at line <a class="el" href="Logger_8C-source.html#l00243">243</a> of file <a class="el" href="Logger_8C-source.html">Logger.C</a>.<p>References <a class="el" href="Logger_8h-source.html#l00101">strHeader</a>.    </td>  </tr></table><a name="a9" doxytag="Logger::setMaxLogLevel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -