You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Rob Mitchell <rj...@attbi.com> on 2002/05/02 20:51:20 UTC
Viewing XMLLayout log file?
Hi,
Here's my log file contents:
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749111" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 1]]></log4j:message>
</log4j:event>
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749111" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 2]]></log4j:message>
</log4j:event>
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749151" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 3]]></log4j:message>
</log4j:event>
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749172" priority="WARN" thread="main">
<log4j:message><![CDATA[2nd hello world: 4]]></log4j:message>
</log4j:event>
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749202" priority="WARN" thread="main">
<log4j:message><![CDATA[2nd hello world: 5]]></log4j:message>
</log4j:event>
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749202" priority="WARN" thread="main">
<log4j:message><![CDATA[2nd hello world: 6]]></log4j:message>
</log4j:event>
<log4j:event category="testOne" timestamp="1020341749262" priority="FATAL" thread="main">
<log4j:message><![CDATA[3rd hello world: testOne]]></log4j:message>
</log4j:event>
<log4j:event category="testOne" timestamp="1020341749262" priority="FATAL" thread="main">
<log4j:message><![CDATA[3rd hello world: testOne]]></log4j:message>
</log4j:event>
<log4j:event category="testOne" timestamp="1020341749312" priority="FATAL" thread="main">
<log4j:message><![CDATA[3rd hello world: testOne]]></log4j:message>
</log4j:event>
so I copy/paste the example from XMLLayout javadocs into this file:
<?xml version="1.0" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd" [<!ENTITY data SYSTEM "test.log">]>
<log4j:eventSet xmlns:log4j="http://jakarta.apache.org/log4j">
&data;
</log4j:eventSet>
and copied the "log4j.dtd" into same directory. So my directory now has all 3 files in same place.
When I fire-up IE5.5 browser, I get this error
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'. Line 1, Position 134
<log4j:event category="com.loomissayles.framework.lslogging.LSLoggerFactory" timestamp="1020341749111" priority="INFO" thread="main">
Can anyone tell me what I'm doing wrong?
Thanks!
_________________________
Rob Mitchell
Base Class Technologies, Inc.
Java, WebSphere, Domino, Oracle development
rjmitchell@attbi.com
Re: Viewing XMLLayout log file?
Posted by Ceki Gülcü <ce...@qos.ch>.
Rob,
You are not doing anything wrong. It is IE which does not recognize that
you have already declated the namespace in log4j:eventset.
If you cut-and-paste the contents of test.log into your xml file it should
work.
For example, my copy of IE 6.0 corectly displays the following xml file:
<?xml version="1.0" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd">
<log4j:eventSet xmlns:log4j="http://jakarta.apache.org/log4">
<log4j:event
category="com.loomissayles.framework.lslogging.LSLoggerFactory"
timestamp="1020341749111" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 1]]></log4j:message>
</log4j:event>
<log4j:event
category="com.loomissayles.framework.lslogging.LSLoggerFactory"
timestamp="1020341749111" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 2]]></log4j:message>
</log4j:event>
<log4j:event
category="com.loomissayles.framework.lslogging.LSLoggerFactory"
timestamp="1020341749151" priority="INFO" thread="main">
<log4j:message><![CDATA[1st hello world: 3]]></log4j:message>
</log4j:event>
</log4j:eventSet>
The problem with SGML inclusions is apparently not unique to IE. See for
example:
http://marc.theaimsgroup.com/?l=xerces-j-dev&m=100029883719200&w=2
http://marc.theaimsgroup.com/?l=xerces-j-dev&m=100080365304891&w=2
http://marc.theaimsgroup.com/?l=xerces-j-dev&m=100080444107550&w=2
http://marc.theaimsgroup.com/?l=xerces-j-dev&m=100082488511957&w=2
HTH.
At 14:51 02.05.2002 -0400, Rob Mitchell wrote:
>Hi,
>
>Here's my log file contents:
><log4j:event
>category="com.loomissayles.framework.lslogging.LSLoggerFactory"
>timestamp="1020341749111" priority="INFO" thread="main">
><log4j:message><![CDATA[1st hello world: 1]]></log4j:message>
></log4j:event>
>
><log4j:event
>category="com.loomissayles.framework.lslogging.LSLoggerFactory"
>timestamp="1020341749111" priority="INFO" thread="main">
><log4j:message><![CDATA[1st hello world: 2]]></log4j:message>
></log4j:event>
>
>so I copy/paste the example from XMLLayout javadocs into this file:
>
><?xml version="1.0" ?>
>
><!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd" [<!ENTITY data SYSTEM
>"test.log">]>
>
><log4j:eventSet xmlns:log4j="http://jakarta.apache.org/log4j">
> &data;
></log4j:eventSet>
>
>and copied the "log4j.dtd" into same directory. So my directory now has
>all 3 files in same place.
>
>When I fire-up IE5.5 browser, I get this error
>
> 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'. Line 1, Position 134
>
><log4j:event
>category="com.loomissayles.framework.lslogging.LSLoggerFactory"
>timestamp="1020341749111" priority="INFO" thread="main">
>
>Can anyone tell me what I'm doing wrong?
>
>Thanks!
>_________________________
>Rob Mitchell
>Base Class Technologies, Inc.
>Java, WebSphere, Domino, Oracle development
>rjmitchell@attbi.com
--
Ceki
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>