logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Waltregny <philippe.waltre...@nrb.be>
Subject log4j - XMLLayout - output.
Date Mon, 26 Jul 2004 12:24:14 GMT
Hello,

I'm trying to use log4j's XMLLayout as documented.



Here are my source codes:

1) File log4j-events

<log4j:event logger="java.logging.log4j.Test" timestamp="1089795669140"
level="DEBUG" thread="main">
<log4j:message><![CDATA[Hello World!]]></log4j:message>
<log4j:locationInfo class="java.logging.log4j.Test" method="execute"
file="Test.java" line="36"/>
</log4j:event>

<log4j:event logger="java.logging.log4j.Test" timestamp="1089795697406"
level="DEBUG" thread="main">
<log4j:message><![CDATA[Hello World!]]></log4j:message>
<log4j:locationInfo class="java.logging.log4j.Test" method="execute"
file="Test.java" line="36"/>
</log4j:event>


2) File log4j.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd"
[
<!ENTITY logEntity SYSTEM "log4j-events">
]>
<log4j:eventSet
	version="1.2"
	xmlns:log4j="http://jakarta.apache.org/log4j/">
	&logEntity;
</log4j:eventSet>



Here is the result when I open the log4j.xml file in Microsoft Internet Explorer
6.0:



The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error and then
click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

Reference to undeclared namespace prefix: 'log4j'. Error processing resource
'file:///C:/java/logging/log4j/log/log4j-events.xml'. Line 1, Position 108 

<log4j:event logger="java.logging.log4j.Test" timestamp="1089795669140"
level="DEBUG" thread="main">



Would you please tell me what's wrong?

Thank you.
 
Philippe Waltregny-Dengis


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message