logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: Log4J with struts and writing to a file
Date Fri, 15 Dec 2006 18:39:32 GMT
In <root>, <level> should be the first element.

On 12/15/06, Adam K <adamk1@gmail.com> wrote:
> Thanks again for the help.  I was sure it was something stupid, and thanks
> to you guys it now works, with one warning - should I be to concerned with
> the following:
>
> WARN The content of element type "root" must match "(param*,(priority
> (details)     javax.enterprise.system.stream.err
> WARN Continuable parsing error 17 and column 10 (details)
>
> Thanks once again.
>
>
> On 12/15/06, Jacob Kjome <hoju@visi.com> wrote:
> >
> >
> > You can't have a well formed XML document without a starting root
> > element.  Add the following after the doctype declaration...
> >
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
> >
> >
> > Jake
> >
> > At 11:48 AM 12/15/2006, you wrote:
> > >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.
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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