Class StackTraceLayout
- java.lang.Object
-
- org.apache.log4j.Layout
-
- edu.cornell.mannlib.vitro.webapp.utils.logging.StackTraceLayout
-
- All Implemented Interfaces:
org.apache.log4j.spi.OptionHandler
public class StackTraceLayout extends org.apache.log4j.LayoutThis is a nasty Layout that prints a full stack trace for every logging event. Here is an example of how to use this to show full stack traces every time we get a log message from org.apache.jena.riot.log4j.appender.RiotAppender=org.apache.log4j.RollingFileAppender log4j.appender.RiotAppender.File= $${catalina.base}/logs/${webapp.name}.riot.log log4j.appender.RiotAppender.MaxFileSize=10MB log4j.appender.RiotAppender.MaxBackupIndex=10 log4j.appender.RiotAppender.layout=edu.cornell.mannlib.vitro.webapp.utils.logging.StackTraceLayout log4j.logger.org.apache.jena.riot=INFO, RiotAppender
-
-
Constructor Summary
Constructors Constructor Description StackTraceLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateOptions()Stringformat(org.apache.log4j.spi.LoggingEvent event)Print the level, the message, and the full stack trace.booleanignoresThrowable()The StackTraceLayout does not handle the throwable contained within LoggingEvents.
-
-
-
Method Detail
-
activateOptions
public void activateOptions()
-
format
public String format(org.apache.log4j.spi.LoggingEvent event)
Print the level, the message, and the full stack trace.- Specified by:
formatin classorg.apache.log4j.Layout
-
ignoresThrowable
public boolean ignoresThrowable()
The StackTraceLayout does not handle the throwable contained within LoggingEvents. Thus, it returnstrue.- Specified by:
ignoresThrowablein classorg.apache.log4j.Layout
-
-