Log4j 1.3alpha-7

org.apache.log4j
Class DailyRollingFileAppender

java.lang.Object
  extended byorg.apache.log4j.DailyRollingFileAppender
All Implemented Interfaces:
Appender, Component, OptionHandler

Deprecated. Replaced by RollingFileAppender

public final class DailyRollingFileAppender
extends Object
implements Appender, OptionHandler

org.apache.log4j.DailyRollingFileAppender emulates earlier implementations by delegating to general purpose org.apache.log4j.rollling.RollingFileAppender introduced in log4j 1.3. This class is provided for compatibility with existing configuration files but is not intended to be compatible with existing extensions of the prior RollingFileAppender and is marked final to prevent such use.

Author:
Curt Arnold

Constructor Summary
DailyRollingFileAppender()
          Deprecated. The default constructor simply calls its parents constructor.
DailyRollingFileAppender(Layout layout, String filename, String datePattern)
          Deprecated. Instantiate a DailyRollingFileAppender and open the file designated by filename.
 
Method Summary
 void activateOptions()
          Deprecated. Prepares DailyRollingFileAppender for use.
 void addFilter(Filter newFilter)
          Deprecated. Add a filter to the end of the filter list.
 void clearFilters()
          Deprecated. Clear the list of filters by removing all the filters in it.
 void close()
          Deprecated. Release any resources allocated within the appender such as file handles, network connections, etc.
 void doAppend(LoggingEvent event)
          Deprecated. Log in Appender specific way.
 boolean getAppend()
          Deprecated. Returns the value of the Append option.
 boolean getBufferedIO()
          Deprecated. Get the value of the BufferedIO option.
 int getBufferSize()
          Deprecated. Get the size of the IO buffer.
 String getDatePattern()
          Deprecated. Returns the value of the DatePattern option.
 ErrorHandler getErrorHandler()
          Deprecated. As of 1.3
 String getFile()
          Deprecated. Returns the value of the File option.
 Filter getFilter()
          Deprecated. Returns the head Filter.
 Layout getLayout()
          Deprecated. Returns this appenders layout.
 String getName()
          Deprecated. Get the name of this appender.
 boolean isActive()
          Deprecated. Is this appender in working order?
 boolean isClosed()
          Deprecated. Is this appender closed?
 void setAppend(boolean flag)
          Deprecated. The Append option takes a boolean value.
 void setBufferedIO(boolean bufferedIO)
          Deprecated. The BufferedIO option takes a boolean value.
 void setBufferSize(int bufferSize)
          Deprecated. Set the size of the IO buffer.
 void setDatePattern(String pattern)
          Deprecated. The DatePattern takes a string in the same format as expected by SimpleDateFormat.
 void setErrorHandler(ErrorHandler eh)
          Deprecated. As of 1.3
 void setFile(String file)
          Deprecated. The File property takes a string value which should be the name of the file to append to.
 void setLayout(Layout layout)
          Deprecated. Set the Layout for this appender.
 void setLoggerRepository(LoggerRepository repository)
          Deprecated. Set owning logger repository for this component.
 void setName(String name)
          Deprecated. Set the name of this appender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DailyRollingFileAppender

public DailyRollingFileAppender()
Deprecated. 
The default constructor simply calls its parents constructor.


DailyRollingFileAppender

public DailyRollingFileAppender(Layout layout,
                                String filename,
                                String datePattern)
                         throws IOException
Deprecated. 
Instantiate a DailyRollingFileAppender and open the file designated by filename. The opened filename will become the ouput destination for this appender.

Method Detail

setDatePattern

public void setDatePattern(String pattern)
Deprecated. 
The DatePattern takes a string in the same format as expected by SimpleDateFormat. This options determines the rollover schedule.


getDatePattern

public String getDatePattern()
Deprecated. 
Returns the value of the DatePattern option. By default, the pattern is set to ".yyyy-MM-dd" meaning daily rollover.


activateOptions

public void activateOptions()
Deprecated. 
Prepares DailyRollingFileAppender for use.

Specified by:
activateOptions in interface OptionHandler

addFilter

public void addFilter(Filter newFilter)
Deprecated. 
Add a filter to the end of the filter list.

Specified by:
addFilter in interface Appender
Since:
0.9.0

getFilter

public Filter getFilter()
Deprecated. 
Returns the head Filter. The Filters are organized in a linked list and so all Filters on this Appender are available through the result.

Specified by:
getFilter in interface Appender
Returns:
the head Filter or null, if no Filters are present
Since:
1.1

clearFilters

public void clearFilters()
Deprecated. 
Clear the list of filters by removing all the filters in it.

Specified by:
clearFilters in interface Appender
Since:
0.9.0

close

public void close()
Deprecated. 
Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.

Specified by:
close in interface Appender
Since:
0.8.4

isClosed

public boolean isClosed()
Deprecated. 
Is this appender closed?

Since:
1.3

isActive

public boolean isActive()
Deprecated. 
Is this appender in working order?

Since:
1.3

doAppend

public void doAppend(LoggingEvent event)
Deprecated. 
Log in Appender specific way. When appropriate, Loggers will call the doAppend method of appender implementations in order to log.

Specified by:
doAppend in interface Appender

getName

public String getName()
Deprecated. 
Get the name of this appender. The name uniquely identifies the appender.

Specified by:
getName in interface Appender

setLayout

public void setLayout(Layout layout)
Deprecated. 
Set the Layout for this appender.

Specified by:
setLayout in interface Appender
Since:
0.8.1

getLayout

public Layout getLayout()
Deprecated. 
Returns this appenders layout.

Specified by:
getLayout in interface Appender
Since:
1.1

setName

public void setName(String name)
Deprecated. 
Set the name of this appender. The name is used by other components to identify this appender.

Specified by:
setName in interface Appender
Since:
0.8.1

setLoggerRepository

public void setLoggerRepository(LoggerRepository repository)
                         throws IllegalStateException
Deprecated. 
Description copied from interface: Component
Set owning logger repository for this component. This operation can only be performed once. Once set, the owning repository cannot be changed.

Specified by:
setLoggerRepository in interface Appender
Throws:
IllegalStateException

setFile

public void setFile(String file)
Deprecated. 
The File property takes a string value which should be the name of the file to append to.

Note that the special values "System.out" or "System.err" are no longer honored.

Note: Actual opening of the file is made when activateOptions() is called, not when the options are set.


getAppend

public boolean getAppend()
Deprecated. 
Returns the value of the Append option.


getFile

public String getFile()
Deprecated. 
Returns the value of the File option.


getBufferedIO

public boolean getBufferedIO()
Deprecated. 
Get the value of the BufferedIO option.

BufferedIO will significatnly increase performance on heavily loaded systems.


getBufferSize

public int getBufferSize()
Deprecated. 
Get the size of the IO buffer.


setAppend

public void setAppend(boolean flag)
Deprecated. 
The Append option takes a boolean value. It is set to true by default. If true, then File will be opened in append mode by setFile (see above). Otherwise, setFile will open File in truncate mode.

Note: Actual opening of the file is made when activateOptions() is called, not when the options are set.


setBufferedIO

public void setBufferedIO(boolean bufferedIO)
Deprecated. 
The BufferedIO option takes a boolean value. It is set to false by default. If true, then File will be opened and the resulting Writer wrapped around a BufferedWriter. BufferedIO will significatnly increase performance on heavily loaded systems.


setBufferSize

public void setBufferSize(int bufferSize)
Deprecated. 
Set the size of the IO buffer.


getErrorHandler

public final ErrorHandler getErrorHandler()
Deprecated. As of 1.3

Return the hardcoded OnlyOnceErrorHandler for this Appender. ErrorHandler's are no longer utilized as of version 1.3.

Specified by:
getErrorHandler in interface Appender
Since:
0.9.0

setErrorHandler

public final void setErrorHandler(ErrorHandler eh)
Deprecated. As of 1.3

Ignored as of 1.3

Specified by:
setErrorHandler in interface Appender
Since:
0.9.0

Log4j 1.3alpha-7

Copyright 2000-2005 Apache Software Foundation.