public class XMLLayout extends LayoutBase<ILoggingEvent>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.StringBuilder |
buf |
private int |
DEFAULT_SIZE |
private boolean |
locationInfo |
private boolean |
properties |
private int |
UPPER_LIMIT |
startedcontext| Constructor and Description |
|---|
XMLLayout() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
doLayout(ILoggingEvent event)
Formats a
ILoggingEvent in conformity with the log4j.dtd. |
java.lang.String |
getContentType()
Returns the content type as appropriate for the implementation.
|
boolean |
getLocationInfo()
Returns the current value of the LocationInfo option.
|
boolean |
getProperties()
Gets whether MDC key-value pairs should be output.
|
void |
setLocationInfo(boolean flag)
The LocationInfo option takes a boolean value.
|
void |
setProperties(boolean flag)
Sets whether MDC key-value pairs should be output, default false.
|
void |
start() |
getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerprivate final int DEFAULT_SIZE
private final int UPPER_LIMIT
private java.lang.StringBuilder buf
private boolean locationInfo
private boolean properties
public void start()
start in interface LifeCyclestart in class LayoutBase<ILoggingEvent>public void setLocationInfo(boolean flag)
If you are embedding this layout within an org.apache.log4j.net.SMTPAppender then make sure to set the
LocationInfo option of that appender as well.
public boolean getLocationInfo()
public void setProperties(boolean flag)
flag - new value.public boolean getProperties()
public java.lang.String doLayout(ILoggingEvent event)
ILoggingEvent in conformity with the log4j.dtd.event - The event to formatpublic java.lang.String getContentType()
LayoutgetContentType in interface Layout<ILoggingEvent>getContentType in class LayoutBase<ILoggingEvent>