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

📄 classlog4cpp_1_1rollingfileappender.html

📁 log4cpp 的参考文档, 一个非常好用的C++ log 类库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>log4cpp: log4cpp::RollingFileAppender Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><div class="nav"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1RollingFileAppender.html">RollingFileAppender</a></div><h1>log4cpp::RollingFileAppender Class Reference</h1><a class="el" href="classlog4cpp_1_1RollingFileAppender.html">RollingFileAppender</a> is a <a class="el" href="classlog4cpp_1_1FileAppender.html">FileAppender</a> that rolls over the logfile once it has reached a certain size limit.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="RollingFileAppender_8hh-source.html">RollingFileAppender.hh</a>&gt;</code><p>Inheritance diagram for log4cpp::RollingFileAppender:<p><center><img src="classlog4cpp_1_1RollingFileAppender__inherit__graph.png" border="0" usemap="#log4cpp_1_1RollingFileAppender__inherit__map" alt="Inheritance graph"></center><map name="log4cpp_1_1RollingFileAppender__inherit__map"><area href="classlog4cpp_1_1FileAppender.html" shape="rect" coords="28,233,182,257" alt=""><area href="classlog4cpp_1_1LayoutAppender.html" shape="rect" coords="18,158,192,182" alt=""><area href="classlog4cpp_1_1AppenderSkeleton.html" shape="rect" coords="13,83,197,107" alt=""><area href="classlog4cpp_1_1Appender.html" shape="rect" coords="38,9,172,33" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for log4cpp::RollingFileAppender:<p><center><img src="classlog4cpp_1_1RollingFileAppender__coll__graph.png" border="0" usemap="#log4cpp_1_1RollingFileAppender__coll__map" alt="Collaboration graph"></center><map name="log4cpp_1_1RollingFileAppender__coll__map"><area href="classlog4cpp_1_1FileAppender.html" shape="rect" coords="157,268,312,292" alt=""><area href="classlog4cpp_1_1LayoutAppender.html" shape="rect" coords="148,190,321,214" alt=""><area href="classlog4cpp_1_1AppenderSkeleton.html" shape="rect" coords="13,100,197,124" alt=""><area href="classlog4cpp_1_1Appender.html" shape="rect" coords="8,9,141,33" alt=""><area href="classlog4cpp_1_1Filter.html" shape="rect" coords="165,9,269,33" alt=""><area href="classlog4cpp_1_1Layout.html" shape="rect" coords="221,100,336,124" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cpp_1_1RollingFileAppender-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="classlog4cpp_1_1RollingFileAppender.html#a0">RollingFileAppender</a> (const std::string &amp;name, const std::string &amp;fileName, size_t maxFileSize=10 *1024 *1024, unsigned int maxBackupIndex=1, bool append=true, mode_t mode=00644)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a1">setMaxBackupIndex</a> (unsigned int maxBackups)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a2">getMaxBackupIndex</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a3">setMaximumFileSize</a> (size_t maxFileSize)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a4">getMaxFileSize</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a5">rollOver</a> ()</td></tr><tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#b0">_append</a> (const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &amp;event)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way.  <a href="#b0"></a><br></td></tr><tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#p0">_maxBackupIndex</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#p1">_maxFileSize</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="classlog4cpp_1_1RollingFileAppender.html">RollingFileAppender</a> is a <a class="el" href="classlog4cpp_1_1FileAppender.html">FileAppender</a> that rolls over the logfile once it has reached a certain size limit. <p><dl compact><dt><b>Since:</b></dt><dd>0.3.1 </dd></dl><p><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="log4cpp::RollingFileAppender::RollingFileAppender"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">log4cpp::RollingFileAppender::RollingFileAppender           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>name</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>fileName</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>size_t&nbsp;</td>          <td class="mdname" nowrap> <em>maxFileSize</em> = <code>10&nbsp;*1024&nbsp;*1024</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap> <em>maxBackupIndex</em> = <code>1</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap> <em>append</em> = <code>true</code>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>mode_t&nbsp;</td>          <td class="mdname" nowrap> <em>mode</em> = <code>00644</code></td>        </tr>        <tr>          <td class="md"></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>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="b0" doxytag="log4cpp::RollingFileAppender::_append"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void log4cpp::RollingFileAppender::_append           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>event</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Log in <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> specific way. <p>Subclasses of <a class="el" href="classlog4cpp_1_1Appender.html">Appender</a> should implement this method to perform actual logging. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>event</em>&nbsp;</td><td>The <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> to log. </td></tr>  </table></dl><p>Reimplemented from <a class="el" href="classlog4cpp_1_1FileAppender.html#b0">log4cpp::FileAppender</a>.    </td>  </tr></table><a class="anchor" name="a2" doxytag="log4cpp::RollingFileAppender::getMaxBackupIndex"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">unsigned int log4cpp::RollingFileAppender::getMaxBackupIndex           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table>

⌨️ 快捷键说明

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