|
Log4j 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.AppenderSkeleton | +--org.apache.log4j.WriterAppender | +--org.apache.log4j.FileAppender | +--org.apache.log4j.RollingFileAppender | +--org.apache.log4j.varia.ExternallyRolledFileAppender
This appender listens on a socket on the port specified by the
PORT_OPTION
for a "RollOver" message. When such a message
is received, the underlying log file is rolled over and an
acknowledgment message is sent back to the process initiating
the roll over.
This method of triggering roll over has the advantage of being operating system independent, fast and reliable.
A simple application Roller
is provided to initiate the
roll over.
Note that the initiator is not authenticated. Anyone can trigger a rollover. In production environments, it is recommended that you add some form of protection to prevent undesired rollovers.
Field Summary | |
static String |
OK
The string constant sent to acknowledge a roll over. |
static String |
PORT_OPTION
Deprecated. Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term. |
static String |
ROLL_OVER
The string constant sent to initiate a roll over. |
Fields inherited from class org.apache.log4j.RollingFileAppender |
MAX_BACKUP_INDEX_OPTION, MAX_FILE_SIZE_OPTION, maxBackupIndex, maxFileSize |
Fields inherited from class org.apache.log4j.FileAppender |
APPEND_OPTION, FILE_OPTION, fileAppend, fileName, qwIsOurs |
Fields inherited from class org.apache.log4j.WriterAppender |
IMMEDIATE_FLUSH_OPTION, immediateFlush, qw |
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold, THRESHOLD_OPTION |
Constructor Summary | |
ExternallyRolledFileAppender()
The default constructor does nothing but calls its super-class constructor. |
Method Summary | |
void |
activateOptions()
Start listening on the port specified by a preceding call to setOption(java.lang.String, java.lang.String) . |
String[] |
getOptionStrings()
Deprecated. We now use JavaBeans introspection to configure components. Options strings are no longer needed. |
int |
getPort()
Returns value of the Port option. |
void |
setOption(String option,
String value)
Deprecated. Use the setter method for the option directly instead of the generic setOption method. |
void |
setPort(int port)
The Port option is used for setting the port for listening to external roll over messages. |
Methods inherited from class org.apache.log4j.RollingFileAppender |
getMaxBackupIndex, getMaximumFileSize, rollOver, setFile, setMaxBackupIndex, setMaxFileSize, setMaxFileSize, setMaximumFileSize, setQWForFiles, subAppend |
Methods inherited from class org.apache.log4j.FileAppender |
closeFile, getAppend, getFile, reset, setAppend, setFile |
Methods inherited from class org.apache.log4j.WriterAppender |
append, checkEntryConditions, close, closeWriter, getImmediateFlush, requiresLayout, setErrorHandler, setImmediateFlush, setWriter, writeFooter, writeHeader |
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 |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PORT_OPTION
All option keys are case sensitive.
public static final String ROLL_OVER
public static final String OK
Constructor Detail |
public ExternallyRolledFileAppender()
Method Detail |
public String[] getOptionStrings()
PORT_OPTION
in addition to the options of its super class FileAppender
.getOptionStrings
in class RollingFileAppender
public void setOption(String option, String value)
setOption
method.
FileAppender
options
and RollingFileAppender
options
, ExternallyRolledFileAppender recognizes the option
Port.
The Port option is used for setting the port for listening to external roll over messages.
setOption
in class RollingFileAppender
public void setPort(int port)
public int getPort()
public void activateOptions()
setOption(java.lang.String, java.lang.String)
.activateOptions
in class FileAppender
|
Log4j 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |