public class XMLLayout extends LayoutBase<ILoggingEvent>
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, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getStatusManager
public void start()
start
in interface LifeCycle
start
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()
Layout
getContentType
in interface Layout<ILoggingEvent>
getContentType
in class LayoutBase<ILoggingEvent>
Copyright © 2010 - 2020 Adobe. All Rights Reserved