|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.log4j.AppenderSkeleton
|
+--edu.mit.util.DocumentAppender
| Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
| Constructor Summary | |
DocumentAppender()
This default constructor does nothing. |
|
DocumentAppender(org.apache.log4j.Layout layout)
Instantiate a DocumentAppender and send output to the given Document object. |
|
DocumentAppender(org.apache.log4j.Layout layout,
Document document)
Instantiate a DocumentAppender and set the output destination to Document. |
|
| Method Summary | |
void |
activateOptions()
Does nothing. |
void |
append(org.apache.log4j.spi.LoggingEvent event)
This method is called by the AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
method. |
protected boolean |
checkEntryConditions()
This method determines if there is a sense in attempting to append. |
void |
close()
Close this appender instance. |
protected void |
insert(String text)
|
boolean |
requiresLayout()
The WriterAppender requires a layout. |
void |
setErrorHandler(org.apache.log4j.spi.ErrorHandler eh)
Set the ErrorHandler for this WriterAppender and also the
underlying QuietWriter if any. |
protected void |
subAppend(org.apache.log4j.spi.LoggingEvent event)
Actual writing occurs here. |
protected void |
writeFooter()
Write a footer as produced by the embedded layout's Layout.getFooter() method. |
protected void |
writeHeader()
Write a header as produced by the embedded layout's Layout.getHeader() method. |
| 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 |
| Constructor Detail |
public DocumentAppender()
public DocumentAppender(org.apache.log4j.Layout layout)
public DocumentAppender(org.apache.log4j.Layout layout,
Document document)
| Method Detail |
public void activateOptions()
activateOptions in class org.apache.log4j.AppenderSkeletonpublic void append(org.apache.log4j.spi.LoggingEvent event)
AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
method.
The format of the output will depend on this appender's layout.
append in class org.apache.log4j.AppenderSkeletonprotected boolean checkEntryConditions()
It checks whether there is a set output target and also if
there is a set layout. If these checks fail, then the boolean
value false is returned.
public void close()
Closed appenders cannot be reused.
close in class org.apache.log4j.AppenderSkeleton#setWriterpublic void setErrorHandler(org.apache.log4j.spi.ErrorHandler eh)
ErrorHandler for this WriterAppender and also the
underlying QuietWriter if any.setErrorHandler in class org.apache.log4j.AppenderSkeletonprotected void subAppend(org.apache.log4j.spi.LoggingEvent event)
Most subclasses of WriterAppender will need to
override this method.
public boolean requiresLayout()
true.requiresLayout in class org.apache.log4j.AppenderSkeletonprotected void writeFooter()
Layout.getFooter() method.protected void writeHeader()
Layout.getHeader() method.protected void insert(String text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||