logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <paul.sm...@lawlex.com.au>
Subject RE: I cannot figure out where my extra message line comes from on the console
Date Wed, 12 Nov 2003 23:11:37 GMT
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


Mime
View raw message