|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.Layout
org.apache.log4j.PatternLayout
org.opencms.util.CmsPatternLayout
public class CmsPatternLayout
Extends the default pattern layout of log4j by adding functionality for filtering the stack traces output.
CAUTION: Do not use classes which instantiate a logger in this class!!!
Usage (log4j.properties):
log4j.appender.OC.layout=org.opencms.util.CmsPatternLayout
log4j.appender.OC.layout.ConversionPattern=%d{DATE} %5p [%30.30C:%4L] %m%n
log4j.appender.OC.layout.Filter=org.apache.tomcat,org.apache.catalina,org.apache.coyote
log4j.appender.OC.layout.Exclude=org.opencms.workplace.list.A_CmsListDialog
log4j.appender.OC.layout.MaxLength=5
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 | |
---|---|
CmsPatternLayout()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
format(org.apache.log4j.spi.LoggingEvent event)
|
boolean |
ignoresThrowable()
|
void |
setExclude(java.lang.String exclude)
Sets an exclusion for preventing the stack trace output. |
void |
setFilter(java.lang.String filter)
Sets a filter for the stack trace output. |
void |
setMaxLength(java.lang.String len)
Sets the maximum length of the stack trace. |
Methods inherited from class org.apache.log4j.PatternLayout |
---|
activateOptions, createPatternParser, getConversionPattern, 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 |
---|
public CmsPatternLayout()
Method Detail |
---|
public java.lang.String format(org.apache.log4j.spi.LoggingEvent event)
format
in class org.apache.log4j.PatternLayout
PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
public boolean ignoresThrowable()
ignoresThrowable
in class org.apache.log4j.PatternLayout
PatternLayout.ignoresThrowable()
public void setExclude(java.lang.String exclude)
exclude
- the names of a classes (comma separated) which should prevent the stack trace outputpublic void setFilter(java.lang.String filter)
filter
- the names of a classes (comma separated) which should be filtered in the stack trace outputpublic void setMaxLength(java.lang.String len)
len
- the maximum length (lines) of the stack trace
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |