public class RollingFileAppender extends FileAppender
Constructor and Description |
---|
RollingFileAppender(java.io.InputStream inputStream,
java.io.File activeFile,
RollingPolicy rollingPolicy,
SparkConf conf,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE() |
void |
deleteOldFiles()
Retain only last few files
|
static scala.collection.Seq<java.io.File> |
getSortedRolledOverFiles(String directory,
String activeFileName)
Get the sorted list of rolled over files.
|
static String |
INTERVAL_DEFAULT() |
static String |
INTERVAL_PROPERTY() |
static String |
RETAINED_FILES_PROPERTY() |
RollingPolicy |
rollingPolicy() |
static String |
SIZE_DEFAULT() |
static String |
SIZE_PROPERTY() |
void |
stop()
Stop the appender
|
static String |
STRATEGY_DEFAULT() |
static String |
STRATEGY_PROPERTY() |
apply, awaitTermination
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public RollingFileAppender(java.io.InputStream inputStream, java.io.File activeFile, RollingPolicy rollingPolicy, SparkConf conf, int bufferSize)
public static String STRATEGY_PROPERTY()
public static String STRATEGY_DEFAULT()
public static String INTERVAL_PROPERTY()
public static String INTERVAL_DEFAULT()
public static String SIZE_PROPERTY()
public static String SIZE_DEFAULT()
public static String RETAINED_FILES_PROPERTY()
public static int DEFAULT_BUFFER_SIZE()
public static scala.collection.Seq<java.io.File> getSortedRolledOverFiles(String directory, String activeFileName)
activeFileName
, and the active file
name has the latest logs. So it sorts all the rolled over logs (that are
prefixed with activeFileName
) and appends the active filepublic RollingPolicy rollingPolicy()
public void stop()
stop
in class FileAppender
public void deleteOldFiles()