<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | |
<title>Apache log4cxx: RollingFileAppender 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.4.6 --> | |
<div class="tabs"> | |
<ul> | |
<li><a href="main.html"><span>Main Page</span></a></li> | |
<li><a href="modules.html"><span>Modules</span></a></li> | |
<li><a href="namespaces.html"><span>Namespaces</span></a></li> | |
<li id="current"><a href="classes.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="classes.html"><span>Alphabetical List</span></a></li> | |
<li><a href="annotated.html"><span>Class List</span></a></li> | |
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | |
<li><a href="functions.html"><span>Class Members</span></a></li> | |
</ul></div> | |
<div class="nav"> | |
<a class="el" href="namespacelog4cxx.html">log4cxx</a>::<a class="el" href="namespacelog4cxx_1_1rolling.html">rolling</a>::<a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html">RollingFileAppender</a></div> | |
<h1>RollingFileAppender Class Reference</h1><!-- doxytag: class="log4cxx::rolling::RollingFileAppender" --><!-- doxytag: inherits="log4cxx::rolling::RollingFileAppenderSkeleton" -->Inherits <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender_skeleton.html">RollingFileAppenderSkeleton</a>. | |
<p> | |
<a href="classlog4cxx_1_1rolling_1_1_rolling_file_appender-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> | |
<code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html">RollingFileAppender</a></code> extends <a class="el" href="classlog4cxx_1_1_file_appender.html">log4cxx::FileAppender</a> to backup the log files depending on <a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy.html">RollingPolicy</a> and <a class="el" href="classlog4cxx_1_1rolling_1_1_triggering_policy.html">TriggeringPolicy</a>. | |
<p> | |
To be of any use, a <code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html">RollingFileAppender</a></code> instance must have both a <code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy.html">RollingPolicy</a></code> and a <code><a class="el" href="classlog4cxx_1_1rolling_1_1_triggering_policy.html">TriggeringPolicy</a></code> set up. However, if its <code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy.html">RollingPolicy</a></code> also implements the <code><a class="el" href="classlog4cxx_1_1rolling_1_1_triggering_policy.html">TriggeringPolicy</a></code> interface, then only the former needs to be set up. For example, <a class="el" href="classlog4cxx_1_1rolling_1_1_time_based_rolling_policy.html">TimeBasedRollingPolicy</a> acts both as a <code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_policy.html">RollingPolicy</a></code> and a <code><a class="el" href="classlog4cxx_1_1rolling_1_1_triggering_policy.html">TriggeringPolicy</a></code>.<p> | |
<code><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html">RollingFileAppender</a></code> can be configured programattically or using <a class="el" href="classlog4cxx_1_1xml_1_1_d_o_m_configurator.html">log4cxx::xml::DOMConfigurator</a>. Here is a sample configration file:<p> | |
<pre><?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration></pre><p> | |
<pre> <log4j:configuration debug="true"></pre><p> | |
<pre> <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender"> | |
<b><rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
<param name="FileNamePattern" value="/wombat/foo.d{yyyy-MM}.gz"/> | |
</rollingPolicy></b></pre><p> | |
<pre> <layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="c{1} - mn"/> | |
</layout> | |
</appender></pre><p> | |
<pre> <root"> | |
<appender-ref ref="ROLL"/> | |
</root></pre><p> | |
<pre> </log4j:configuration> | |
</pre><p> | |
This configuration file specifies a monthly rollover schedule including automatic compression of the archived files. See <a class="el" href="classlog4cxx_1_1rolling_1_1_time_based_rolling_policy.html">TimeBasedRollingPolicy</a> for more details. | |
<p> | |
<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="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html#7ff2336642ee72e003ad17ae21111b2a">RollingFileAppender</a> ()</td></tr> | |
</table> | |
<hr><h2>Constructor & Destructor Documentation</h2> | |
<a class="anchor" name="7ff2336642ee72e003ad17ae21111b2a"></a><!-- doxytag: member="log4cxx::rolling::RollingFileAppender::RollingFileAppender" ref="7ff2336642ee72e003ad17ae21111b2a" args="()" --><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"><a class="el" href="classlog4cxx_1_1rolling_1_1_rolling_file_appender.html">RollingFileAppender</a> </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<hr>The documentation for this class was generated from the following file:<ul> | |
<li><a class="el" href="rolling_2rollingfileappender_8h.html">rolling/rollingfileappender.h</a></ul> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--> | |
</BODY> | |
</HTML> |