|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.Layout
Extend this abstract class to create your own log layout format.
Field Summary | |
java.io.CharArrayWriter |
charArrayWriter
|
protected boolean |
ignoresThrowable
|
static java.lang.String |
LINE_SEP
|
static int |
LINE_SEP_LEN
|
Constructor Summary | |
Layout()
|
Method Summary | |
java.lang.String |
format(LoggingEvent event)
Implement this method to create your own layout format. |
abstract void |
format(java.io.Writer output,
LoggingEvent event)
|
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. |
boolean |
ignoresThrowable()
If the layout handles the throwable object contained within LoggingEvent , then the layout should return false .
|
void |
setFooter(java.lang.String footer)
Set the footer. |
void |
setHeader(java.lang.String header)
Set the header. |
void |
setIgnoresThrowable(boolean ignoresThrowable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.log4j.spi.OptionHandler |
activateOptions |
Field Detail |
public static final java.lang.String LINE_SEP
public static final int LINE_SEP_LEN
public java.io.CharArrayWriter charArrayWriter
protected boolean ignoresThrowable
Constructor Detail |
public Layout()
Method Detail |
public java.lang.String format(LoggingEvent event)
public abstract void format(java.io.Writer output, LoggingEvent event) throws java.io.IOException
java.io.IOException
public java.lang.String getContentType()
public java.lang.String getHeader()
public java.lang.String getFooter()
public boolean ignoresThrowable()
LoggingEvent
, then the layout should return false
.
Otherwise, if the layout ignores throwable object, then the layout should
return true
.
By default, SimpleLayout
, TTCCLayout
, PatternLayout
all return true
. The XMLLayout
returns false
.
As of log4j version 1.3, ignoresThrowable is a settable property. Thus, you can override, a layout's default setting.
public void setIgnoresThrowable(boolean ignoresThrowable)
ignoresThrowable
- public void setFooter(java.lang.String footer)
footer
- the footerpublic void setHeader(java.lang.String header)
header
- the header
|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |