Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

de.danet.an.util.log4j
Class ListAppender  view ListAppender download ListAppender.java

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended byde.danet.an.util.log4j.ListAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class ListAppender
extends org.apache.log4j.AppenderSkeleton

This class provides an appender that adds log messages to a list found in the MDC.

Version:
$Revision: 1.4 $

Nested Class Summary
static class ListAppender.UIMessage
          This class defines the log message sent to user interface.
 
Field Summary
private static org.apache.log4j.Category logger
           
static java.lang.String MDC_LIST_KEY
          Unter this key is the appended messages saved in the MDC.
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
ListAppender()
          Creates an instance of ListAppender with all attributes initialized to default values.
 
Method Summary
 void append(org.apache.log4j.spi.LoggingEvent event)
          Forwards the message to the EJBSink bean.
 void close()
          Internal method.
 boolean requiresLayout()
          Internal method.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Category logger

MDC_LIST_KEY

public static final java.lang.String MDC_LIST_KEY
Unter this key is the appended messages saved in the MDC.

See Also:
Constant Field Values
Constructor Detail

ListAppender

public ListAppender()
Creates an instance of ListAppender with all attributes initialized to default values.

Method Detail

append

public void append(org.apache.log4j.spi.LoggingEvent event)
Forwards the message to the EJBSink bean.


close

public void close()
Internal method. Close the database connection and flush the buffer.


requiresLayout

public boolean requiresLayout()
Internal method. Returns true, you may define your own layout...