Package com.mapr.log4j
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
DailyRollingLogAppender for MapRFS - majority of functionality is from
DailyRollingFileAppender with enhanced asynch. handling of old files removal
-
Field Summary
Fields inherited from class com.mapr.log4j.MaprfsLogAppender
BUFFER_SIZE, DIR_PREFIX, failoverAppender, failoverAppenderName, fileName, fileNamePath, immediateFlush, immediateSync, maprFS, nameHierarchy, syncIntervalSeconds, uriFields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidappend(org.apache.log4j.spi.LoggingEvent event) This method differentiates DailyRollingFileAppender from its super class.Returns the value of the DatePattern option.intvoidsetDatePattern(String pattern) The DatePattern takes a string in the same format as expected bySimpleDateFormat.voidsetMaxBackupIndex(int maxBackups) Methods inherited from class com.mapr.log4j.MaprfsLogAppender
close, closeFile, createFile, failoverToLocalLogs, flush, getFile, getFileSize, getImmediateFlush, getImmediateSync, getLogFilePermission, getSyncIntervalSeconds, hflush, hsync, requiresLayout, setFailoverAppender, setFile, setFS, setImmediateFlush, setImmediateSync, setSyncIntervalSeconds, setURI, sync, writeFooter, writeHeaderMethods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
-
Constructor Details
-
MaprfsDailyRollingLogAppender
public MaprfsDailyRollingLogAppender() -
MaprfsDailyRollingLogAppender
-
-
Method Details
-
setDatePattern
The DatePattern takes a string in the same format as expected bySimpleDateFormat. This options determines the rollover schedule. -
getDatePattern
Returns the value of the DatePattern option. -
setMaxBackupIndex
public void setMaxBackupIndex(int maxBackups) -
getMaxBackupIndex
public int getMaxBackupIndex() -
activateOptions
public void activateOptions()- Specified by:
activateOptionsin interfaceorg.apache.log4j.spi.OptionHandler- Overrides:
activateOptionsin classMaprfsLogAppender
-
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:
appendin classMaprfsLogAppender
-