HI
i am using the comfigurator file which is an XML file.
but the DOMConfigurator class's config method is giving error.
will you please mail me the exact procedure XML configurator file

regards
suneel
----- Original Message -----
From: "Apvrille, Axelle" <[EMAIL PROTECTED]>
To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 1:42 PM
Subject: RE: log4j: ERROR No appenders could be found for category though I
Ha ve specified an appender ?!


> hello,
> Just to let you know I had found my problem : configuration file was okay
> but there was _one_ little log request in my sources before I had
> initialized property configurator.
>
> cat.debug("..."); <<<--------------- ERROR Message for that log !
> PropertyConfigurator.configure(System.getProperty("log4j.conf.file"));
>
> Sorry, and hope my error helps others...
> Axelle.
>
> > -----Message d'origine-----
> > De : Apvrille, Axelle
> > Objet : log4j: ERROR No appenders could be found for category...
> >
> > Hi,
> >
> > I'm sorry I have to ask this question again, but I haven't
> > seen the exact
> > answer to my problem or understood the answers... (?)
> >
> > I've got the following complaints from log4j :
> > log4j:ERROR No appenders could be found for category
> > (worm.gui.TimestamperGUI).
> > log4j:ERROR Please initialize the log4j system properly.
> >
> > I've read from the "troubleshooting guide" this is because there's no
> > appenders attached to my category or its ancestors. But I've
> > done that ! My
> > configuration file is :
> >
> > log4j.rootCategory=DEBUG,MyFileAppender,MyConsoleAppender
> > [..Definition of MyFileAppender and MyConsoleAppender...]
> > log4j.category.worm=DEBUG,MyFileAppender, MyConsoleAppender
> >
> > Isn't that last line attach worm category to my appenders ?
> > If worm is an
> > ancestor of worm.gui.TimestampGUI, this should be okay ?
> >
> > -------
> > Other maybe useful information :
> > I'm passing my configuration file to the program through a
> > system property :
> > java ... -Dlog4j.conf.file="log.properties" worm.gui.TimestampGUI
> >
> > Then, in my application, I've got :
> > package worm.gui;
> > [...]
> > import org.apache.log4j.Category;
> > import org.apache.log4j.PropertyConfigurator;
> > public class TimestampGUI {
> > static Category cat =
> > Category.getInstance(TimestamperGUI.class.getName());
> > [...]
> > public static void main(String args[]){
> >   cat.debug("--> main()");
> >
> >   try {
> >     // setting up trace file
> >
> > PropertyConfigurator.configure(System.getProperty("log4j.conf.file"));
> >     cat.info("Trace controller starts.");
> >   }
> >   catch(NullPointerException exp){
> >     // no logging configuration file has been specified
> >     // we disable logging
> >     Category.getDefaultHierarchy().disableAll();
> >   }
> > }
> > }
>
> ---------------------------------------------------------------------
> 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