Package org.bgerp.util.log
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 SummaryFields inherited from class org.apache.log4j.WriterAppenderencoding, immediateFlush, qwFields inherited from class org.apache.log4j.AppenderSkeletonclosed, errorHandler, headFilter, layout, name, tailFilter, threshold
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic final StringgetSessionLog(javax.servlet.http.HttpSession session) static TrackedSessionFound a tracked session for the current threadstatic booleanisTracked(javax.servlet.http.HttpSession session) static final voidtrack(javax.servlet.http.HttpSession session, boolean create) Add to tracked the current thread for a sessionstatic final voiduntrack()Removes the current thread mapping to a tracked sessionstatic final voiduntrack(javax.servlet.http.HttpSession session) Removes references of all threads to a tracked sessionMethods inherited from class org.apache.log4j.WriterAppenderactivateOptions, append, checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, reset, setEncoding, setErrorHandler, setImmediateFlush, setWriter, shouldFlush, subAppend, writeFooter, writeHeaderMethods inherited from class org.apache.log4j.AppenderSkeletonaddFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold
- 
Constructor Details- 
SessionLogAppenderpublic SessionLogAppender()
 
- 
- 
Method Details- 
trackpublic static final void track(javax.servlet.http.HttpSession session, boolean create) Add to tracked the current thread for a session- Parameters:
- session- the session
 
- 
untrackpublic static final void untrack()Removes the current thread mapping to a tracked session
- 
untrackpublic static final void untrack(javax.servlet.http.HttpSession session) Removes references of all threads to a tracked session- Parameters:
- session- the session
 
- 
getTrackedFound a tracked session for the current thread- Returns:
- the found tracked session or null
 
- 
isTrackedpublic static boolean isTracked(javax.servlet.http.HttpSession session) 
- 
getSessionLog
 
-