Quoting dirk ooms <[EMAIL PROTECTED]>:

> On Monday 15 January 2007 19:04, Jacob Kjome wrote:
> > The file should look something like this...
> >
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> > <log4j:configuration xmlns:log4j="http://logging.apache.org/log4j/";
> > debug="false" threshold="debug">
>
> AFAIK the <log4j:configuration> tag was used in version 1.2.x, but it is
> inproper xml. In 1.3 this was corrected (or at least an attempt was made) to
> <configuration>. So it might be that the deprecated DOMConfigurator is still
> expecting <log4j:configuration> ..., but if one relies on the default
> initialization, the tag <configuration> is expected in version 1.3.
>

Exactly.  The deprecated DOMConfigurator still uses the old syntax.  I don't
recall whether the JoranConfigurator can deal with the old syntax or not?  It's
been a while since I tested that (I think maybe it doesn't).  In any case, it
should, just to be backward compatible.  Or, at least, JoranConfigurator should
recognize the old syntax and defer to DOMConfigurator in that case.  Of course
there's other compatibility gotcha's between 1.2 and 1.3.


Jake

> dirk
>
> >
> > ....
> > ....
> > ....
> >
> > </log4j:configuration>
> >
> >
> > Jake
> >
> > Quoting Surya Poola <[EMAIL PROTECTED]>:
> > > Hi,
> > >   Iam getting the following warnings if  iam using DOM Configurator and
> > > iam not getting the log file created:
> > >
> > >   log4j:WARN Continuable parsing error 2 and column 16
> > > log4j:WARN Document root element "configuration", must match DOCTYPE root
> > > "null".
> > > log4j:WARN Continuable parsing error 2 and column 16
> > > log4j:WARN Document is invalid: no grammar found.
> > > log4j:WARN The <configuration> element has been deprecated.
> > > log4j:WARN Use the <log4j:configuration> element instead.
> > >
> > > I hope DOM configurator doesnot support the xml generated for log4j1.3
> > > from (http://wizardforge.org/pc?action=show), like
> > >
> > >   <?xml version="1.0" encoding="UTF-8"?>
> > >   <configuration>
> > >   <appender class="org.apache.log4j.rolling.RollingFileAppender"
> > > name="MyFileAppender">
> > >   <param name="Append" value="true"/>
> > >   <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
> > >   <param name="FileNamePattern"
> >
> > value="/pkg/vdcu0/home/bischru0/AladinArchiveViewer.d/AladinArchiveViewer.%
> >d{yyyy-MM}.gz"/>
> >
> > >   </rollingPolicy>
> > >   <layout class="org.apache.log4j.PatternLayout">
> > >   <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t
> > > %m%n"/>
> > >   </layout>
> > >   </appender>
> > >   <root>
> > >   <level value="info"/>
> > >   <appender-ref ref="MyFileAppender"/>
> > >   </root>
> > >   </configuration>
> > >
> > >   I have tried changing the xml as per log4j1.2.x version ,but then also
> > > i am getting the same error.so can anyone suggest me the proper usage of
> > > rollingfielappender in log4j1.3 version.
> > >
> > >   Thanks in advance
> > >
> > >   Regards
> > >   Rohan
> > >
> > > James Stauffer <[EMAIL PROTECTED]> wrote:
> > >   Even though DOMConfigurator is depreciated it may still work and it
> > > may be worthwhile to try it to see if your config is ok.
> > >
> > > On 1/15/07, Surya Poola wrote:
> > > > Dirk,
> > > >
> > > > Thanks for your help,but iam sorry to query you once more:
> > > >
> > > > I already have gone through the document.My question is in log4j 1.2.8
> > > > i
> > >
> > > was using the following for DailyRollingFileAppender to map to
> > > configuration
> > >
> > > file :
> > > > DOMConfigurator.configure(mLOG4JCONFIGFILE);
> > > > where mLOG4JCONFIGFILE was the property where i mentioned the location
> > > > of
> > >
> > > xml file.
> > >
> > > > But in 1.3 alpha-8,DOMConfigurator is depracated.
> > > >
> > > > So iam forced to use joranconfigurator, by which iam not able to write
> > > > to
> > >
> > > file,ie, file is not created.I am mentioning my program as follows:
> > > > JoranConfigurator jc = new JoranConfigurator();
> > > > jc.doConfigure(mLOG4JCONFIGFILE, LogManager.getLoggerRepository());
> > > >
> > > > So can you let me kow how to configure with joranconfigurator or any
> > > > other
> > >
> > > configurator.
> > >
> > > > Thanks in advance
> > > >
> > > > Regards
> > > > Rohan
> > > >
> > > > Dirk Ooms wrote:
> > > > Rohan,
> > > >
> > > > have a look at the 'Default Initalization Procedure' at
> > >
> > > http://logging.apache.org/log4j/docs/manual.html
> > >
> > > > it explains how log4j will find your config file.
> > > >
> > > > dirk
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > No need to miss a message. Get email on-the-go
> > > > with Yahoo! Mail for Mobile. Get started.
> > >
> > > --
> > > James Stauffer http://www.geocities.com/stauffer_james/
> > > Are you good? Take the test at http://www.livingwaters.com/good/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > The fish are biting.
> > >  Get more visitors on your site using Yahoo! Search Marketing.
> > >
> > > ---------------------------------
> > > Be a PS3 game guru.
> > > Get your game face on with the latest PS3 news and previews at Yahoo!
> > > Games.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to