Class SessionLogAppender

java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.WriterAppender
org.bgerp.util.log.SessionLogAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class SessionLogAppender extends org.apache.log4j.WriterAppender
In-memory log appender for the current user' session.
  • Field Summary Link icon

    Fields inherited from class org.apache.log4j.WriterAppender Link icon

    encoding, immediateFlush, qw

    Fields inherited from class org.apache.log4j.AppenderSkeleton Link icon

    closed, errorHandler, headFilter, layout, name, tailFilter, threshold
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static final String
    getSessionLog(javax.servlet.http.HttpSession session)
     
    Found a tracked session for the current thread
    static boolean
    isTracked(javax.servlet.http.HttpSession session)
     
    static final void
    track(javax.servlet.http.HttpSession session, boolean create)
    Add to tracked the current thread for a session
    static final void
    Removes the current thread mapping to a tracked session
    static final void
    untrack(javax.servlet.http.HttpSession session)
    Removes references of all threads to a tracked session

    Methods inherited from class org.apache.log4j.WriterAppender Link icon

    activateOptions, append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeader

    Methods inherited from class org.apache.log4j.AppenderSkeleton Link icon

    addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold

    Methods inherited from class java.lang.Object Link icon

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • SessionLogAppender Link icon

      public SessionLogAppender()
  • Method Details Link icon

    • track Link icon

      public static final void track(javax.servlet.http.HttpSession session, boolean create)
      Add to tracked the current thread for a session
      Parameters:
      session - the session
    • untrack Link icon

      public static final void untrack()
      Removes the current thread mapping to a tracked session
    • untrack Link icon

      public static final void untrack(javax.servlet.http.HttpSession session)
      Removes references of all threads to a tracked session
      Parameters:
      session - the session
    • getTracked Link icon

      public static TrackedSession getTracked()
      Found a tracked session for the current thread
      Returns:
      the found tracked session or null
    • isTracked Link icon

      public static boolean isTracked(javax.servlet.http.HttpSession session)
    • getSessionLog Link icon

      public static final String getSessionLog(javax.servlet.http.HttpSession session)