public abstract class Layout extends java.lang.Object implements OptionHandler
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
LINE_SEP |
static int |
LINE_SEP_LEN |
构造器和说明 |
---|
Layout() |
限定符和类型 | 方法和说明 |
---|---|
abstract java.lang.String |
format(LoggingEvent event)
Implement this method to create your own layout format.
|
java.lang.String |
getContentType()
Returns the content type output by this layout.
|
java.lang.String |
getFooter()
Returns the footer for the layout format.
|
java.lang.String |
getHeader()
Returns the header for the layout format.
|
abstract boolean |
ignoresThrowable()
If the layout handles the throwable object contained within
LoggingEvent , then the layout should return
false . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activateOptions
public static final java.lang.String LINE_SEP
public static final int LINE_SEP_LEN
public abstract java.lang.String format(LoggingEvent event)
public java.lang.String getContentType()
public java.lang.String getHeader()
null
.public java.lang.String getFooter()
null
.public abstract boolean ignoresThrowable()
LoggingEvent
, then the layout should return
false
. Otherwise, if the layout ignores throwable
object, then the layout should return true
.
If ignoresThrowable is true, the appender is responsible for
rendering the throwable.
The SimpleLayout
, TTCCLayout
, PatternLayout
all return true
. The XMLLayout
returns false
.