|
Log4j 1.3alpha-8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.DailyRollingFileAppender
RollingFileAppender
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.
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? |
boolean |
requiresLayout()
Deprecated. Gets whether appender requires a layout. |
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 |
public DailyRollingFileAppender()
parents constructor
.public DailyRollingFileAppender(Layout layout, String filename, String datePattern) throws IOException
filename
. The opened filename will become the ouput
destination for this appender.Method Detail |
public void setDatePattern(String pattern)
SimpleDateFormat
. This options determines the
rollover schedule.public String getDatePattern()
public void activateOptions()
activateOptions
in interface OptionHandler
public void addFilter(Filter newFilter)
addFilter
in interface Appender
public Filter getFilter()
getFilter
in interface Appender
public void clearFilters()
clearFilters
in interface Appender
public void close()
It is a programming error to append to a closed appender.
close
in interface Appender
public boolean isClosed()
public boolean isActive()
public void doAppend(LoggingEvent event)
Appender
specific way. When appropriate, Loggers will
call the doAppend
method of appender implementations in
order to log.doAppend
in interface Appender
public String getName()
getName
in interface Appender
public void setLayout(Layout layout)
Layout
for this appender.setLayout
in interface Appender
public Layout getLayout()
getLayout
in interface Appender
public void setName(String name)
setName
in interface Appender
public void setLoggerRepository(LoggerRepository repository) throws IllegalStateException
Component
setLoggerRepository
in interface Component
org.apache.log4j.spi.Component
repository
- The repository where this appender is attached.IllegalStateException
- If you try to change the repository after it
has been set.public void setFile(String file)
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.
public boolean getAppend()
public String getFile()
public boolean getBufferedIO()
BufferedIO will significatnly increase performance on heavily loaded systems.
public int getBufferSize()
public void setAppend(boolean flag)
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.
public void setBufferedIO(boolean bufferedIO)
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.public void setBufferSize(int bufferSize)
public final ErrorHandler getErrorHandler()
OnlyOnceErrorHandler
for this Appender.
ErrorHandler
's are no longer utilized as of version 1.3.getErrorHandler
in interface Appender
public final void setErrorHandler(ErrorHandler eh)
setErrorHandler
in interface Appender
public boolean requiresLayout()
requiresLayout
in interface Appender
|
Log4j 1.3alpha-8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |