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
 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)
The markup in the document following the root element must be
well-formed. at com.sun.org.apache.xe... (details)
ERROR Could not parse url
(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)
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)
DocumentBuilderFactory is:
(details) 	javax.enterprise.system.stream.out
Standard DocumentBuilderFactory search succeded. (details)
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"/>
  <!-- Configure the root appender -->
    <appender-ref ref="util"/>
    <level value="info"/>

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.

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