## imcode.util.log
Class DailyRollingFileAppender

    java.lang.Object
      org.apache.log4j.AppenderSkeleton
          org.apache.log4j.WriterAppender
              org.apache.log4j.FileAppender
                  imcode.util.log.DailyRollingFileAppender

All Implemented Interfaces:
  org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

    public class DailyRollingFileAppender

extends org.apache.log4j.FileAppender

Complete ripoff of org.apache.log4j.DailyRollingFileAppender in log4j 1.2.8, since it has bugs and was impossible to subclass.

Field Summary

Fields inherited from class org.apache.log4j.FileAppender
`bufferedIO, bufferSize, fileAppend, fileName`

Fields inherited from class org.apache.log4j.WriterAppender
`encoding, immediateFlush, qw`

Fields inherited from class org.apache.log4j.AppenderSkeleton
`closed, errorHandler, headFilter, layout, name, tailFilter, threshold`

Constructor Summary
`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`.

Method Summary
`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.

Methods inherited from class org.apache.log4j.FileAppender
`closeFile, getAppend, getBufferedIO, getBufferSize, getFile, reset, setAppend, setBufferedIO, setBufferSize, setFile, setFile, setQWForFiles`

Methods inherited from class org.apache.log4j.WriterAppender
`append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter, writeFooter, writeHeader`

Methods inherited from class org.apache.log4j.AppenderSkeleton
`addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DailyRollingFileAppender

    public DailyRollingFileAppender()

  The default constructor does nothing.

### DailyRollingFileAppender

    public DailyRollingFileAppender(org.apache.log4j.Layout layout,
                                    java.lang.String filename,
                                    java.lang.String datePattern)
                             throws java.io.IOException

  Instantiate a `DailyRollingFileAppender` and open the file designated by `filename`. The opened filename will become the ouput destination for this appender.

  Throws:
    `java.io.IOException`

Method Detail

### setDatePattern

    public void setDatePattern(java.lang.String pattern)

  The DatePattern takes a string in the same format as expected by `SimpleDateFormat`. This options determines the rollover schedule.

### activateOptions

    public void activateOptions()

  Specified by:
    `activateOptions` in interface `org.apache.log4j.spi.OptionHandler`
  Overrides:
    `activateOptions` in class `org.apache.log4j.FileAppender`

### subAppend

    protected void subAppend(org.apache.log4j.spi.LoggingEvent event)

  This method differentiates DailyRollingFileAppender from its super class.

  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.

  Overrides:
    `subAppend` in class `org.apache.log4j.WriterAppender`