Class MaprfsDailyRollingLogAppender

java.lang.Object
org.apache.log4j.AppenderSkeleton
com.mapr.log4j.MaprfsLogAppender
com.mapr.log4j.MaprfsDailyRollingLogAppender
All Implemented Interfaces:
Flushable, org.apache.hadoop.fs.Syncable, org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class MaprfsDailyRollingLogAppender extends MaprfsLogAppender
DailyRollingLogAppender for MapRFS - majority of functionality is from DailyRollingFileAppender with enhanced asynch. handling of old files removal
  • Constructor Details

    • MaprfsDailyRollingLogAppender

      public MaprfsDailyRollingLogAppender()
    • MaprfsDailyRollingLogAppender

      public MaprfsDailyRollingLogAppender(URI uri, String datePattern)
  • Method Details

    • setDatePattern

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

      public String getDatePattern()
      Returns the value of the DatePattern option.
    • setMaxBackupIndex

      public void setMaxBackupIndex(int maxBackups)
    • getMaxBackupIndex

      public int getMaxBackupIndex()
    • activateOptions

      public void activateOptions()
      Specified by:
      activateOptions in interface org.apache.log4j.spi.OptionHandler
      Overrides:
      activateOptions in class MaprfsLogAppender
    • append

      protected void append(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:
      append in class MaprfsLogAppender