PatternLayout
public abstract class Layout extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
LINE_SEP_LEN |
Note that the line.separator property can be looked up even by applets.
|
Constructor | Description |
---|---|
Layout() |
Modifier and Type | Method | Description |
---|---|---|
abstract String |
format(LoggingEvent event) |
Implement this method to create your own layout format.
|
String |
getContentType() |
Returns the content type output by this layout.
|
String |
getFooter() |
Returns the footer for the layout format.
|
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 . |
public static final int LINE_SEP_LEN
public abstract String format(LoggingEvent event)
event
- The LoggingEvent.public String getContentType()
public String getHeader()
null
.public 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
.
Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.