|
|||||||||
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 java.lang.String |
ArchiveDirectoryNameKey
Property for where the log file will be archive to |
static java.lang.String |
DefaultEncoding
The default encoding to be used. |
static java.lang.String |
DirectoryNameKey
Property for what the directory of the log file will be |
static java.lang.String |
LogFileNameKey
Property for what the name of the log file will be |
static java.lang.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 |
java.lang.String |
getArchiveDirectoryName()
|
java.lang.String |
getDirectoryName()
Returns the directory for the log file. |
static java.util.Iterator |
getIteratorForAppenders()
|
java.lang.String |
getLastArchivedFileName()
Gets the name of the most recent archived log file. |
java.lang.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(java.lang.String archiveDirectoryName)
Set the archive directory for the log file. |
void |
setDirectoryName(java.lang.String directoryName)
Set the directory for the log file, should be called prior to calling #activateOptions. |
void |
setMaxArchiveSize(java.lang.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 java.lang.String LogFileNameKey
public static final java.lang.String DirectoryNameKey
public static final java.lang.String ArchiveDirectoryNameKey
public static final java.lang.String MaxArchiveSizeKey
public static final java.lang.String DefaultEncoding
Constructor Detail |
---|
public ArchivingAppender()
Method Detail |
---|
public static java.util.Iterator getIteratorForAppenders()
public void removeFromAllInstances()
public java.lang.String getLastArchivedFileName()
public void setDirectoryName(java.lang.String directoryName)
directoryName
- directory as Stringpublic java.lang.String getDirectoryName()
public void setArchiveDirectoryName(java.lang.String archiveDirectoryName)
archiveDirectoryName
- directory as Stringpublic java.lang.String getArchiveDirectoryName()
public void setMaxArchiveSize(java.lang.String maxArchiveSize)
maxArchiveSize
- size in mega bytespublic java.lang.String getMaxArchiveSize()
public void archiveLogFile()
public boolean initLogDirectories()
public void monitorDirectories()
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.FileAppender
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |