public class DailyRollingFileAppender
extends org.apache.log4j.FileAppender
| Constructor and Description |
|---|
DailyRollingFileAppender()
The default constructor does nothing.
|
DailyRollingFileAppender(org.apache.log4j.Layout layout,
java.lang.String filename,
java.lang.String datePattern)
Instantiate a
DailyRollingFileAppender and open the
file designated by filename. |
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions() |
void |
setDatePattern(java.lang.String pattern)
The DatePattern takes a string in the same format as
expected by
SimpleDateFormat. |
protected void |
subAppend(org.apache.log4j.spi.LoggingEvent event)
This method differentiates DailyRollingFileAppender from its
super class.
|
closeFile, getAppend, getBufferedIO, getBufferSize, getFile, reset, setAppend, setBufferedIO, setBufferSize, setFile, setFile, setQWForFilesappend, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, writeFooter, writeHeaderpublic DailyRollingFileAppender()
public DailyRollingFileAppender(org.apache.log4j.Layout layout,
java.lang.String filename,
java.lang.String datePattern)
throws java.io.IOException
DailyRollingFileAppender and open the
file designated by filename. The opened filename will
become the ouput destination for this appender.java.io.IOExceptionpublic void setDatePattern(java.lang.String pattern)
SimpleDateFormat. This options determines the
rollover schedule.public void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandleractivateOptions in class org.apache.log4j.FileAppenderprotected void subAppend(org.apache.log4j.spi.LoggingEvent event)
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.
subAppend in class org.apache.log4j.WriterAppender