org.opencms.util
public class CmsPatternLayout extends org.apache.log4j.PatternLayout
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
Constructor and Description |
---|
CmsPatternLayout()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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