When i use the 
XMLLayout as shown below:

log4j.appender.R.layout=org.apache.log4j.xml.XMLLayout

It generates the following message:
<log4j:event category="plat.ivss.sloc" timestamp="1029016634611" 
level="WARN" thread="main">
<log4j:message><![CDATA[WARN]]></log4j:message>
</log4j:event>

The issue i am facing is that the log4j.dtd defines the event as 
follows:

<!ATTLIST log4j:event
category CDATA #REQUIRED
priority CDATA #REQUIRED
thread CDATA #REQUIRED
timestamp CDATA #REQUIRED
>

Note that the dtd uses "priority" while the XMLLayout 
uses "level"(for severity levels like DEBUG, WARN etc). How can i fix 
it? I looked up the code for XMLLayout i has the following lines of 
code:
buf.append("<log4j:event category=\"");
buf.append(event.categoryName);
buf.append("\" timestamp=\"");
buf.append(event.timeStamp);
buf.append("\" level=\"");
buf.append(event.level);

Since "level" is hardcoded in the Java file i am assuming there is no 
way to configure this.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to