Package org.apache.log4j.bridge
Class LayoutWrapper
- java.lang.Object
-
- org.apache.log4j.Layout
-
- org.apache.log4j.bridge.LayoutWrapper
-
public class LayoutWrapper extends Layout
Bridge between the Log4j 1 Layout and a Log4j 2 Layout.
-
-
Field Summary
-
Fields inherited from class org.apache.log4j.Layout
LINE_SEP, LINE_SEP_LEN
-
-
Constructor Summary
Constructors Constructor Description LayoutWrapper(Layout<?> layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(LoggingEvent event)
Implement this method to create your own layout format.Layout<?>
getLayout()
boolean
ignoresThrowable()
If the layout handles the throwable object contained withinLoggingEvent
, then the layout should returnfalse
.-
Methods inherited from class org.apache.log4j.Layout
getContentType, getFooter, getHeader
-
-
-
-
Constructor Detail
-
LayoutWrapper
public LayoutWrapper(Layout<?> layout)
-
-
Method Detail
-
format
public String format(LoggingEvent event)
Description copied from class:Layout
Implement this method to create your own layout format.
-
ignoresThrowable
public boolean ignoresThrowable()
Description copied from class:Layout
If the layout handles the throwable object contained withinLoggingEvent
, then the layout should returnfalse
. Otherwise, if the layout ignores throwable object, then the layout should returntrue
. If ignoresThrowable is true, the appender is responsible for rendering the throwable.The SimpleLayout, TTCCLayout, PatternLayout all return
true
. The XMLLayout returnsfalse
.- Specified by:
ignoresThrowable
in classLayout
- Returns:
- true if the Layout ignores Throwables.
-
getLayout
public Layout<?> getLayout()
-
-