logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chang, Betty" <bch...@datasweep.com>
Subject RE: I cannot figure out where my extra message line comes from onthe console
Date Wed, 12 Nov 2003 23:26:15 GMT
Hi -- Thanks for all your help!  The -Dlog4j.debug did the trick.  It
was picking a log4j.properties from within the axis.jar file.   Just
doing a "dir /s"  did not find one since it was within the jar file.

Okay -- so my next question is -- what's the easiest way to get my
program to ignore that log4j.properties file?     (I don't really want
to use my own file -- I just want to configure it in the code).

Thanks

Betty


-----Original Message-----
From: Paul Smith [mailto:paul.smith@lawlex.com.au] 
Sent: Wednesday, November 12, 2003 3:12 PM
To: Log4J Users List
Subject: RE: I cannot figure out where my extra message line comes from
onthe console

On Thu, 2003-11-13 at 10:00, Ken.Liu@bmwna.com wrote:
> Paul -
> 
> Are you sure about that?  I thought that only happened with
> BasicConfigurator.configure() (no params).
> 
>   /**
>      Add <code>appender</code> to the root category.
>      @param appender The appender to add to the root category.
>   */
>   static
>   public
>   void configure(Appender appender) {
>     Logger root = Logger.getRootLogger();
>     root.addAppender(appender);
>   }
> 
> 
> Maybe she is picking up a log4j config file from the classpath?

Ken, you're 100% correct, I miss-read her code.

Betty, I would suggest commenting out all the lines except the
logger.info.  What you should see is a warning about no appenders being
found, but if you get output, then something else is configuring Log4j. 
If this is the case, try adding -Dlog4j.debug=true to the command line
as you run your code, this should output info on what config file it is
picking up.

cheers,

Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message