nl.idgis.giserver
Class GiServerLog4jAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by nl.idgis.giserver.GiServerLog4jAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class GiServerLog4jAppender
extends org.apache.log4j.AppenderSkeleton

GiServerLog4jAppender is an log4j appender. Its collects the reports and will be write then into a SWF file on activation method reportToSWF.
The major extension on the standard log4j appender is the thread awareness. This appender collects the report only for his own thread.

Author:
bretelerjj

Constructor Summary
GiServerLog4jAppender()
           
 
Method Summary
 void attachToLogger(java.lang.String category)
          Attach this logger to the given category.
 void close()
           
 boolean containsLoggingInfo()
           
 void detachFromLogger()
          detach this appender from its catogory where is was attached to.
 boolean reports(org.w3c.dom.Document doc)
          Report all the collects log4j reports to a DOM tree.
 void reportToResponse(javax.servlet.http.HttpServletResponse response)
          Try to flush the gathered errors etc to the reponse output medium
 void reportToSWF(nl.idgis.flash.FlashMovie movie)
          Report all the collects log4j reports to the SWF file in the form of an action liste item.
 boolean requiresLayout()
           
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GiServerLog4jAppender

public GiServerLog4jAppender()
Method Detail

containsLoggingInfo

public boolean containsLoggingInfo()

reports

public boolean reports(org.w3c.dom.Document doc)
Report all the collects log4j reports to a DOM tree.

Parameters:
node - the concerned DOM tree node to hang up the error messages

reportToSWF

public void reportToSWF(nl.idgis.flash.FlashMovie movie)
Report all the collects log4j reports to the SWF file in the form of an action liste item.

Parameters:
movie - the concerned movie who generate the SWF file

reportToResponse

public void reportToResponse(javax.servlet.http.HttpServletResponse response)
Try to flush the gathered errors etc to the reponse output medium

Parameters:
response -

requiresLayout

public boolean requiresLayout()
Specified by:
requiresLayout in interface org.apache.log4j.Appender
Specified by:
requiresLayout in class org.apache.log4j.AppenderSkeleton

close

public void close()
Specified by:
close in interface org.apache.log4j.Appender
Specified by:
close in class org.apache.log4j.AppenderSkeleton

attachToLogger

public void attachToLogger(java.lang.String category)
Attach this logger to the given category.
Register current thread indication.

Parameters:
category -

detachFromLogger

public void detachFromLogger()
detach this appender from its catogory where is was attached to.