📄 classlog4cpp_1_1rollingfileappender.html
字号:
<!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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related 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 <<a class="el" href="RollingFileAppender_8hh-source.html">RollingFileAppender.hh</a>></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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1RollingFileAppender.html#a0">RollingFileAppender</a> (const std::string &name, const std::string &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 </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 </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 </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 </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 </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 </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> &event)</td></tr><tr><td class="mdescLeft"> </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 </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 </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 & 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">( </td> <td class="md" nowrap valign="top">const std::string & </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 & </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 </td> <td class="mdname" nowrap> <em>maxFileSize</em> = <code>10 *1024 *1024</code>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>unsigned int </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 </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 </td> <td class="mdname" nowrap> <em>mode</em> = <code>00644</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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">( </td> <td class="md" nowrap valign="top">const <a class="el" href="structlog4cpp_1_1LoggingEvent.html">LoggingEvent</a> & </td> <td class="mdname1" valign="top" nowrap> <em>event</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </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> </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">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </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 + -