java.lang.Objectorg.apache.log4j.Layout
org.apache.log4j.xml.XMLLayout
All Implemented Interfaces:
OptionHandler
For example, if abc is the name of the file where
the XMLLayout ouput goes, then a well-formed XML file would be:
<?xml version="1.0" ?> <!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd" [<!ENTITY data SYSTEM "abc">]> <log4j:eventSet version="1.2" xmlns:log4j="http://jakarta.apache.org/log4j/"> &data; </log4j:eventSet>
This approach enforces the independence of the XMLLayout and the appender where it is embedded.
The version attribute helps components to correctly
intrepret output generated by XMLLayout. The value of this
attribute should be "1.1" for output generated by log4j versions
prior to log4j 1.2 (final release) and "1.2" for relase 1.2 and
later.
Appenders using this layout should have their encoding
set to UTF-8 or UTF-16, otherwise events containing
non ASCII characters could result in corrupted
log files.
Ceki - Gülcü0.9.0 - | Fields inherited from org.apache.log4j.Layout: |
|---|
| LINE_SEP, LINE_SEP_LEN |
| Method from org.apache.log4j.xml.XMLLayout Summary: |
|---|
| activateOptions, format, getLocationInfo, getProperties, ignoresThrowable, setLocationInfo, setProperties |
| Methods from org.apache.log4j.Layout: |
|---|
| format, getContentType, getFooter, getHeader, ignoresThrowable |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.log4j.xml.XMLLayout Detail: |
|---|
|
|
|
|
false. |
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. |
|