|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.log4j.AppenderSkeleton
org.apache.log4j.WriterAppender
org.apache.log4j.FileAppender
ariba.util.log.ArchivingAppender
public class ArchivingAppender
This class extends org.apache.log4j.FileAppender to provide archiving support. It allows one to optionally specify the name of the directory of the file to archive and the archiving directory where the acrhived file will reside.
| Field Summary | |
|---|---|
static String |
ArchiveDirectoryNameKey
Property for where the log file will be archive to |
static String |
DefaultEncoding
The default encoding to be used. |
static String |
DirectoryNameKey
Property for what the directory of the log file will be |
static String |
LogFileNameKey
Property for what the name of the log file will be |
static String |
MaxArchiveSizeKey
Property for how large the archive directory can grow before being pruned. |
| Constructor Summary | |
|---|---|
ArchivingAppender()
Construct an ArchivingAppender. |
|
| Method Summary | |
|---|---|
void |
activateOptions()
Active the options set for this class. |
void |
archiveLogFile()
Archive the currently opened log file |
String |
getArchiveDirectoryName()
|
String |
getDirectoryName()
Returns the directory for the log file. |
static Iterator |
getIteratorForAppenders()
|
String |
getLastArchivedFileName()
Gets the name of the most recent archived log file. |
String |
getMaxArchiveSize()
|
boolean |
initLogDirectories()
Create the standard directories that are needed for logging information from the specified Ariba product. |
void |
monitorDirectories()
|
void |
removeFromAllInstances()
Removes this ArchivingAppender from the list of allInstances. |
void |
setArchiveDirectoryName(String archiveDirectoryName)
Set the archive directory for the log file. |
void |
setDirectoryName(String directoryName)
Set the directory for the log file, should be called prior to calling #activateOptions. |
void |
setMaxArchiveSize(String maxArchiveSize)
Set the max archive directory size |
| Methods inherited from class org.apache.log4j.FileAppender |
|---|
getAppend, getBufferedIO, getBufferSize, getFile, setAppend, setBufferedIO, setBufferSize, setFile, setFile |
| Methods inherited from class org.apache.log4j.WriterAppender |
|---|
append, close, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LogFileNameKey
public static final String DirectoryNameKey
public static final String ArchiveDirectoryNameKey
public static final String MaxArchiveSizeKey
public static final String DefaultEncoding
| Constructor Detail |
|---|
public ArchivingAppender()
| Method Detail |
|---|
public static Iterator getIteratorForAppenders()
public void removeFromAllInstances()
public String getLastArchivedFileName()
public void setDirectoryName(String directoryName)
directoryName - directory as Stringpublic String getDirectoryName()
public void setArchiveDirectoryName(String archiveDirectoryName)
archiveDirectoryName - directory as Stringpublic String getArchiveDirectoryName()
public void setMaxArchiveSize(String maxArchiveSize)
maxArchiveSize - size in mega bytespublic String getMaxArchiveSize()
public void archiveLogFile()
public boolean initLogDirectories()
public void monitorDirectories()
public void activateOptions()
activateOptions in interface org.apache.log4j.spi.OptionHandleractivateOptions in class org.apache.log4j.FileAppender
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||