logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam K" <ada...@gmail.com>
Subject Log4J with struts and writing to a file
Date Fri, 15 Dec 2006 17:48:24 GMT
Sorry to bother you all again, but I am trying to get log4j to work
with files and have recieved an error which I am not certain how to
fix.
 Unfortunately I thought I had everything working correctly yesterday,
but it seems that I didn't

So it is finding the .xml file, it just has an issue with it saying it
isn't well formed.

	WARN No appenders could be found for logger
(org.apache.struts.util.PropertyMessageResources). (details)
	javax.enterprise.system.stream.err
The markup in the document following the root element must be
well-formed. at com.sun.org.apache.xe... (details)
	javax.enterprise.system.stream.err
ERROR Could not parse url
[file:/opt/SUNWappserver/domains/domain1/applications/j2ee-modules/...
(details) 	javax.enterprise.system.stream.err
WARN The markup in the document following the root element must be
well-formed. (details) 	javax.enterprise.system.stream.err
WARN Fatal parsing error 14 and column 4 (details)
	javax.enterprise.system.stream.err
WARN Document root element "appender", must match DOCTYPE root
"log4j:configuration". (details) 	javax.enterprise.system.stream.err
WARN Continuable parsing error 6 and column 61 (details)
	javax.enterprise.system.stream.err
DocumentBuilderFactory is:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
(details) 	javax.enterprise.system.stream.out
Standard DocumentBuilderFactory search succeded. (details)
	javax.enterprise.system.stream.out
System property is :null (details) 	javax.enterprise.system.stream.out 	
Preferred configurator class: org.apache.log4j.xml.DOMConfigurator (details)

The xml file that I have is the following:


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">


  <!-- Create a rolling file appender called "T" for the system log -->
     <appender name="util" class="org.apache.log4j.FileAppender">
        <param name="File"
value="/opt/SUNWappserver/domains/domain1/logs/util.log" />
        <param name="Append" value="true" />
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
        </layout>
     </appender>
  <!-- Configure the root appender -->
  <root>
    <appender-ref ref="util"/>
    <level value="info"/>
  </root>
</log4j:configuration>


Again if anyone can point out if I am doing something blatently stupid
please do so.

Thanks so much for all your time on the matter.

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