logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Stauffer <jstau...@spscommerce.com>
Subject RE: XMLLayout
Date Fri, 30 Jul 2004 12:28:43 GMT
You should be able to at least view the file in a text editor.

James Stauffer


-----Original Message-----
From: Philippe Waltregny [mailto:philippe.waltregny@nrb.be] 
Sent: Friday, July 30, 2004 3:40 AM
To: log4j-user@jakarta.apache.org
Subject: XMLLayout



Hello,

Sorry to bother you but is anybody able to help me?



I'm trying to use log4j's XMLLayout.



Here are my source codes:

1) log4j-events file

<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) log4j.xml file

<?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


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message