blob: c36b7d799f29a264de9f0749ae8481070d83942d [file] [log] [blame]
<html>
<head>
<title>
log4cxx - Documentation
</title>
<link href="../css/doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<!-- START Header table -->
<table border="0" cellspacing="0" width="90%">
<!-- TOP IMAGE -->
<tr>
<td colspan="2">
<a href="http://logging.apache.org">
<img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/>
</a>
</td>
</tr>
</table>
<!-- END Header table -->
<!-- START main table -->
<table id="main" border="0" width="90%" cellspacing="2" cellpadding="0">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td id="navbar" valign="top">
<!-- ============================================================ -->
<table id="navbar" border="0" cellspacing="0" cellpadding="0">
<tr >
<td class="navbarHeader" nowrap="true">
<strong>Apache</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a>
</small></td></tr>
<tr >
<td class="navbarHeader" nowrap="true">
<strong>log4cxx project</strong>
</td>
</tr>
<tr><td class="navbarItem"><small> <a href="../index.html">About</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../news.html">News</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../team.html">Team</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a>
</small></td></tr>
<tr><td class="navbarItem"><small> <a href="../download.html">Download</a>
</small></td></tr>
</table>
</td>
<td id="mainContents" align="left" valign="top">
<hr>
<!-- Generated by Doxygen 1.3.5 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>RollingCalendar Class Reference</h1>Collaboration diagram for RollingCalendar:<p><center><img src="classlog4cxx_1_1RollingCalendar__coll__graph.png" border="0" usemap="#RollingCalendar__coll__map" alt="Collaboration graph"></center>
<map name="RollingCalendar__coll__map">
<area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="24,19,96,43" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1RollingCalendar-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>PeriodicityType&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1RollingCalendar.html#a3">computeTriggeringPeriod</a> (const String &amp;datePattern)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::TimeZonePtr</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1RollingCalendar.html#a6">getTimeZone</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1RollingCalendar.html#a7">setTimeZone</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::TimeZonePtr</a> &amp;timeZone)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classlog4cxx_1_1RollingCalendar.html">RollingCalendar</a> is a helper class to <a class="el" href="classlog4cxx_1_1DailyRollingFileAppender.html">DailyRollingFileAppender</a>. Given a periodicity type and the current time, it computes the start of the next interval.
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3" doxytag="log4cxx::RollingCalendar::computeTriggeringPeriod" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> RollingCalendar::PeriodicityType computeTriggeringPeriod </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>datePattern</em> </td>
<td class="md" valign="top">&nbsp;)&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 computes the roll over period by looping over the periods, starting with the shortest, and stopping when the r0 is different from from r1, where r0 is the epoch formatted according the datePattern (supplied by the user) and r1 is the epoch+nextMillis(i) formatted according to datePattern. All date formatting is done in GMT and not local format because the test logic is based on comparisons relative to 1970-01-01 00:00:00 GMT (the epoch). </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="log4cxx::RollingCalendar::getTimeZone" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::TimeZonePtr</a> getTimeZone </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> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the time zone. <dl compact><dt><b>Returns:</b></dt><dd>the time zone object associated with this calendar.</dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="log4cxx::RollingCalendar::setTimeZone" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void setTimeZone </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">helpers::TimeZonePtr</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>timeZone</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the time zone with the given time zone value. <dl compact><dt><b>Returns:</b></dt><dd>value the given time zone.</dd></dl>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>dailyrollingfileappender.h<li>dailyrollingfileappender.cpp</ul>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->