org.mmbase.util.logging.log4j
Class StacktraceLoggingPatternLayout

java.lang.Object
  extended byorg.apache.log4j.Layout
      extended byorg.apache.log4j.PatternLayout
          extended byorg.mmbase.util.logging.log4j.StacktraceLoggingPatternLayout
All Implemented Interfaces:
OptionHandler

public class StacktraceLoggingPatternLayout
extends PatternLayout

This layout can be used in logging in order to print out a stacktrace for a given logging event. THis is a very expensive call, but can be very useful when trying to find application bugs. Using this layout you will see exactly which line of code (or which JSP) generated the exception.

Author:
Johannes Verelst

Field Summary
 
Fields inherited from class org.apache.log4j.PatternLayout
BUF_SIZE, DEFAULT_CONVERSION_PATTERN, MAX_CAPACITY, TTCC_CONVERSION_PATTERN
 
Fields inherited from class org.apache.log4j.Layout
LINE_SEP, LINE_SEP_LEN
 
Constructor Summary
StacktraceLoggingPatternLayout()
           
 
Method Summary
 String format(LoggingEvent event)
          Overridden from PatternLayout; use the normal pattern to format the logevent, but also return the current stacktrace.
 
Methods inherited from class org.apache.log4j.PatternLayout
activateOptions, createPatternParser, getConversionPattern, ignoresThrowable, setConversionPattern
 
Methods inherited from class org.apache.log4j.Layout
getContentType, getFooter, getHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StacktraceLoggingPatternLayout

public StacktraceLoggingPatternLayout()
Method Detail

format

public String format(LoggingEvent event)
Overridden from PatternLayout; use the normal pattern to format the logevent, but also return the current stacktrace.



MMBase build 1.8.1.20060716