org.log4j
Class Layout
java.lang.Object
|
+--org.log4j.Layout
- All Implemented Interfaces:
- OptionHandler
- Direct Known Subclasses:
- DateLayout, PatternLayout, SimpleLayout, XMLLayout
- public abstract class Layout
- extends Object
- implements OptionHandler
Extend this abstract class to create your own log layout format.
- Since:
- log4j v0.7.0
- Author:
- Ceki Gülcü
Method Summary |
abstract String |
format(LoggingEvent event)
Implement this method to create your own layout format. |
abstract boolean |
ignoresThrowable()
If the layout handles the throwable object contained within
LoggingEvent , then the layout should return
false . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LINE_SEP
public static final String LINE_SEP
LINE_SEP_LEN
public static final int LINE_SEP_LEN
Layout
public Layout()
format
public abstract String format(LoggingEvent event)
- Implement this method to create your own layout format.
ignoresThrowable
public abstract boolean ignoresThrowable()
- If the layout handles the throwable object contained within
LoggingEvent
, then the layout should return
false
. Otherwise, if the layout ignores throwable
object, then the layout should return true
.
The SimpleLayout
, TTCCLayout
, PatternLayout
all return true
. The XMLLayout
returns false
.
- Since:
- version 0.8.4
Please notify me about new log4j releases.