blob: d2bc345a2f68023290b30041d90f3f3ff5177b03 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_31) -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DailyRollingFileAppender (Apache Log4j 1.2.17 API)
</TITLE>
<META NAME="date" CONTENT="2012-06-09">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DailyRollingFileAppender (Apache Log4j 1.2.17 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DailyRollingFileAppender.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/log4j/ConsoleAppender.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/log4j/DefaultThrowableRenderer.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/log4j/DailyRollingFileAppender.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DailyRollingFileAppender.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.log4j.FileAppender">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.log4j</FONT>
<BR>
Class DailyRollingFileAppender</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">org.apache.log4j.AppenderSkeleton</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/apache/log4j/WriterAppender.html" title="class in org.apache.log4j">org.apache.log4j.WriterAppender</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j">org.apache.log4j.FileAppender</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.apache.log4j.DailyRollingFileAppender</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/apache/log4j/Appender.html" title="interface in org.apache.log4j">Appender</A>, <A HREF="../../../org/apache/log4j/spi/OptionHandler.html" title="interface in org.apache.log4j.spi">OptionHandler</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>DailyRollingFileAppender</B><DT>extends <A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j">FileAppender</A></DL>
</PRE>
<P>
DailyRollingFileAppender extends <A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j"><CODE>FileAppender</CODE></A> so that the
underlying file is rolled over at a user chosen frequency.
DailyRollingFileAppender has been observed to exhibit
synchronization issues and data loss. The log4j extras
companion includes alternatives which should be considered
for new deployments and which are discussed in the documentation
for org.apache.log4j.rolling.RollingFileAppender.
<p>The rolling schedule is specified by the <b>DatePattern</b>
option. This pattern should follow the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html?is-external=true" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A>
conventions. In particular, you <em>must</em> escape literal text
within a pair of single quotes. A formatted version of the date
pattern is used as the suffix for the rolled file name.
<p>For example, if the <b>File</b> option is set to
<code>/foo/bar.log</code> and the <b>DatePattern</b> set to
<code>'.'yyyy-MM-dd</code>, on 2001-02-16 at midnight, the logging
file <code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17
will continue in <code>/foo/bar.log</code> until it rolls over
the next day.
<p>Is is possible to specify monthly, weekly, half-daily, daily,
hourly, or minutely rollover schedules.
<p><table border="1" cellpadding="2">
<tr>
<th>DatePattern</th>
<th>Rollover schedule</th>
<th>Example</th>
<tr>
<td><code>'.'yyyy-MM</code>
<td>Rollover at the beginning of each month</td>
<td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be
copied to <code>/foo/bar.log.2002-05</code>. Logging for the month
of June will be output to <code>/foo/bar.log</code> until it is
also rolled over the next month.
<tr>
<td><code>'.'yyyy-ww</code>
<td>Rollover at the first day of each week. The first day of the
week depends on the locale.</td>
<td>Assuming the first day of the week is Sunday, on Saturday
midnight, June 9th 2002, the file <i>/foo/bar.log</i> will be
copied to <i>/foo/bar.log.2002-23</i>. Logging for the 24th week
of 2002 will be output to <code>/foo/bar.log</code> until it is
rolled over the next week.
<tr>
<td><code>'.'yyyy-MM-dd</code>
<td>Rollover at midnight each day.</td>
<td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will
be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the
9th day of March will be output to <code>/foo/bar.log</code> until
it is rolled over the next day.
<tr>
<td><code>'.'yyyy-MM-dd-a</code>
<td>Rollover at midnight and midday of each day.</td>
<td>At noon, on March 9th, 2002, <code>/foo/bar.log</code> will be
copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the
afternoon of the 9th will be output to <code>/foo/bar.log</code>
until it is rolled over at midnight.
<tr>
<td><code>'.'yyyy-MM-dd-HH</code>
<td>Rollover at the top of every hour.</td>
<td>At approximately 11:00.000 o'clock on March 9th, 2002,
<code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour
of the 9th of March will be output to <code>/foo/bar.log</code>
until it is rolled over at the beginning of the next hour.
<tr>
<td><code>'.'yyyy-MM-dd-HH-mm</code>
<td>Rollover at the beginning of every minute.</td>
<td>At approximately 11:23,000, on March 9th, 2001,
<code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute
of 11:23 (9th of March) will be output to
<code>/foo/bar.log</code> until it is rolled over the next minute.
</table>
<p>Do not use the colon ":" character in anywhere in the
<b>DatePattern</b> option. The text before the colon is interpeted
as the protocol specificaion of a URL which is probably not what
you want.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Eirik Lygre, Ceki G&uuml;lc&uuml;</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.log4j.FileAppender"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j">FileAppender</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/FileAppender.html#bufferedIO">bufferedIO</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#bufferSize">bufferSize</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#fileAppend">fileAppend</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#fileName">fileName</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.log4j.WriterAppender"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/WriterAppender.html" title="class in org.apache.log4j">WriterAppender</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/WriterAppender.html#encoding">encoding</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#immediateFlush">immediateFlush</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#qw">qw</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.log4j.AppenderSkeleton"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html#closed">closed</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#errorHandler">errorHandler</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#headFilter">headFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#layout">layout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#name">name</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#tailFilter">tailFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#threshold">threshold</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#DailyRollingFileAppender()">DailyRollingFileAppender</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default constructor does nothing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#DailyRollingFileAppender(org.apache.log4j.Layout, java.lang.String, java.lang.String)">DailyRollingFileAppender</A></B>(<A HREF="../../../org/apache/log4j/Layout.html" title="class in org.apache.log4j">Layout</A>&nbsp;layout,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;datePattern)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiate a <code>DailyRollingFileAppender</code> and open the
file designated by <code>filename</code>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#activateOptions()">activateOptions</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the value of <b>File</b> is not <code>null</code>, then <A HREF="../../../org/apache/log4j/FileAppender.html#setFile(java.lang.String)"><CODE>FileAppender.setFile(java.lang.String)</CODE></A> is called with the values of <b>File</b> and
<b>Append</b> properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#getDatePattern()">getDatePattern</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of the <b>DatePattern</b> option.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#setDatePattern(java.lang.String)">setDatePattern</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;pattern)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <b>DatePattern</b> takes a string in the same format as
expected by <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html?is-external=true" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/log4j/DailyRollingFileAppender.html#subAppend(org.apache.log4j.spi.LoggingEvent)">subAppend</A></B>(<A HREF="../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A>&nbsp;event)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method differentiates DailyRollingFileAppender from its
super class.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.log4j.FileAppender"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j">FileAppender</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/FileAppender.html#closeFile()">closeFile</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#getAppend()">getAppend</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#getBufferedIO()">getBufferedIO</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#getBufferSize()">getBufferSize</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#getFile()">getFile</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#reset()">reset</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setAppend(boolean)">setAppend</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setBufferedIO(boolean)">setBufferedIO</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setBufferSize(int)">setBufferSize</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setFile(java.lang.String)">setFile</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setFile(java.lang.String, boolean, boolean, int)">setFile</A>, <A HREF="../../../org/apache/log4j/FileAppender.html#setQWForFiles(java.io.Writer)">setQWForFiles</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.log4j.WriterAppender"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/WriterAppender.html" title="class in org.apache.log4j">WriterAppender</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/WriterAppender.html#append(org.apache.log4j.spi.LoggingEvent)">append</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#checkEntryConditions()">checkEntryConditions</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#close()">close</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#closeWriter()">closeWriter</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#createWriter(java.io.OutputStream)">createWriter</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#getEncoding()">getEncoding</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#getImmediateFlush()">getImmediateFlush</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#requiresLayout()">requiresLayout</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#setEncoding(java.lang.String)">setEncoding</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#setErrorHandler(org.apache.log4j.spi.ErrorHandler)">setErrorHandler</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#setImmediateFlush(boolean)">setImmediateFlush</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#setWriter(java.io.Writer)">setWriter</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#shouldFlush(org.apache.log4j.spi.LoggingEvent)">shouldFlush</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#writeFooter()">writeFooter</A>, <A HREF="../../../org/apache/log4j/WriterAppender.html#writeHeader()">writeHeader</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.log4j.AppenderSkeleton"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.log4j.<A HREF="../../../org/apache/log4j/AppenderSkeleton.html" title="class in org.apache.log4j">AppenderSkeleton</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/log4j/AppenderSkeleton.html#addFilter(org.apache.log4j.spi.Filter)">addFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#clearFilters()">clearFilters</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#doAppend(org.apache.log4j.spi.LoggingEvent)">doAppend</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#finalize()">finalize</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getErrorHandler()">getErrorHandler</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getFilter()">getFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getFirstFilter()">getFirstFilter</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getLayout()">getLayout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getName()">getName</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#getThreshold()">getThreshold</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#isAsSevereAsThreshold(org.apache.log4j.Priority)">isAsSevereAsThreshold</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setLayout(org.apache.log4j.Layout)">setLayout</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setName(java.lang.String)">setName</A>, <A HREF="../../../org/apache/log4j/AppenderSkeleton.html#setThreshold(org.apache.log4j.Priority)">setThreshold</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DailyRollingFileAppender()"><!-- --></A><H3>
DailyRollingFileAppender</H3>
<PRE>
public <B>DailyRollingFileAppender</B>()</PRE>
<DL>
<DD>The default constructor does nothing.
<P>
</DL>
<HR>
<A NAME="DailyRollingFileAppender(org.apache.log4j.Layout, java.lang.String, java.lang.String)"><!-- --></A><H3>
DailyRollingFileAppender</H3>
<PRE>
public <B>DailyRollingFileAppender</B>(<A HREF="../../../org/apache/log4j/Layout.html" title="class in org.apache.log4j">Layout</A>&nbsp;layout,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filename,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;datePattern)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Instantiate a <code>DailyRollingFileAppender</code> and open the
file designated by <code>filename</code>. The opened filename will
become the ouput destination for this appender.
<P>
<DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setDatePattern(java.lang.String)"><!-- --></A><H3>
setDatePattern</H3>
<PRE>
public void <B>setDatePattern</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;pattern)</PRE>
<DL>
<DD>The <b>DatePattern</b> takes a string in the same format as
expected by <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html?is-external=true" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A>. This options determines the
rollover schedule.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDatePattern()"><!-- --></A><H3>
getDatePattern</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getDatePattern</B>()</PRE>
<DL>
<DD>Returns the value of the <b>DatePattern</b> option.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="activateOptions()"><!-- --></A><H3>
activateOptions</H3>
<PRE>
public void <B>activateOptions</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../org/apache/log4j/FileAppender.html#activateOptions()">FileAppender</A></CODE></B></DD>
<DD>If the value of <b>File</b> is not <code>null</code>, then <A HREF="../../../org/apache/log4j/FileAppender.html#setFile(java.lang.String)"><CODE>FileAppender.setFile(java.lang.String)</CODE></A> is called with the values of <b>File</b> and
<b>Append</b> properties.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/log4j/spi/OptionHandler.html#activateOptions()">activateOptions</A></CODE> in interface <CODE><A HREF="../../../org/apache/log4j/spi/OptionHandler.html" title="interface in org.apache.log4j.spi">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/apache/log4j/FileAppender.html#activateOptions()">activateOptions</A></CODE> in class <CODE><A HREF="../../../org/apache/log4j/FileAppender.html" title="class in org.apache.log4j">FileAppender</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="subAppend(org.apache.log4j.spi.LoggingEvent)"><!-- --></A><H3>
subAppend</H3>
<PRE>
protected void <B>subAppend</B>(<A HREF="../../../org/apache/log4j/spi/LoggingEvent.html" title="class in org.apache.log4j.spi">LoggingEvent</A>&nbsp;event)</PRE>
<DL>
<DD>This method differentiates DailyRollingFileAppender from its
super class.
<p>Before actually logging, this method will check whether it is
time to do a rollover. If it is, it will schedule the next
rollover time and then rollover.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/apache/log4j/WriterAppender.html#subAppend(org.apache.log4j.spi.LoggingEvent)">subAppend</A></CODE> in class <CODE><A HREF="../../../org/apache/log4j/WriterAppender.html" title="class in org.apache.log4j">WriterAppender</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DailyRollingFileAppender.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/log4j/ConsoleAppender.html" title="class in org.apache.log4j"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/log4j/DefaultThrowableRenderer.html" title="class in org.apache.log4j"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/log4j/DailyRollingFileAppender.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DailyRollingFileAppender.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.log4j.FileAppender">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 1999-2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>