Package org.apache.log4j
Class VectorAppender
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.log4j.VectorAppender
-
- All Implemented Interfaces:
Appender
,OptionHandler
public class VectorAppender extends AppenderSkeleton
Appends logging events to a vector.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.log4j.AppenderSkeleton
AppenderSkeleton.NoOpErrorHandler
-
-
Field Summary
Fields Modifier and Type Field Description Vector
vector
-
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
-
-
Constructor Summary
Constructors Constructor Description VectorAppender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateOptions()
Does nothing.void
append(LoggingEvent event)
This method is called by theAppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
method.void
close()
Release any resources allocated within the appender such as file handles, network connections, etc.Vector
getVector()
boolean
isClosed()
boolean
requiresLayout()
Configurators call this method to determine if the appender requires a layout.-
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
-
-
-
-
Field Detail
-
vector
public Vector vector
-
-
Method Detail
-
activateOptions
public void activateOptions()
Does nothing.- Specified by:
activateOptions
in interfaceOptionHandler
- Overrides:
activateOptions
in classAppenderSkeleton
-
append
public void append(LoggingEvent event)
This method is called by theAppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
method.- Specified by:
append
in classAppenderSkeleton
-
close
public void close()
Description copied from interface:Appender
Release any resources allocated within the appender such as file handles, network connections, etc.It is a programming error to append to a closed appender.
-
getVector
public Vector getVector()
-
isClosed
public boolean isClosed()
-
requiresLayout
public boolean requiresLayout()
Description copied from interface:Appender
Configurators call this method to determine if the appender requires a layout. If this method returnstrue
, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returnsfalse
, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return
true
.- Returns:
- true if a Layout is required.
-
-