logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony <deja_tony_...@yahoo.com>
Subject Re: Problem with log4j not finding config file in WEB-INF/classes
Date Fri, 03 Aug 2001 01:29:48 GMT
Thanks for the help folks this did the trick.  I had log4j.jar in my TomCat
path.  But another question,  If I have many web apps, and they all want to use
log4j I have to include the log4j.jar file in each of these packages.  Isnt
this a waste of space, and an upgrade problem in the case when a new log4j.jar
library becomes available - I have to repackage each to the web apps again with
the new log4j.jar file.  Is there any way around this?

Cheers

Tony


--- Craig_Reichenbach@lotus.com wrote:
> 
> Right.  I had this problem last night.  I was putting log4j.jar in the
> classpath of my startCatalina batch script  and expecting the properties
> file in my web-inf/classes directories to be found.  It wasn't.  You need
> log4j.jar in the web-inf/lib directory.
> 
> 
> 
>                                                                              
>                                                       
>                     "William                                                 
>                                                       
>                     Jaynes"              To:     "LOG4J Users Mailing List"
> <log4j-user@jakarta.apache.org>                         
>                     <wjaynes@media       cc:     (bcc: Craig
> Reichenbach/CAM/Lotus)                                                 
>                     one.net>             Subject:     Re: Problem with log4j
> not finding config file in WEB-INF/classes             
>                                                                              
>                                                       
>                     08/02/2001                                               
>                                                       
>                     06:50 AM                                                 
>                                                       
>                     Please respond                                           
>                                                       
>                     to "LOG4J                                                
>                                                       
>                     Users Mailing                                            
>                                                       
>                     List"                                                    
>                                                       
>                                                                              
>                                                       
>                                                                              
>                                                       
> 
> 
> 
> 
> If for each web application the log4j.jar file is in WEB-INF/lib and the
> log4j.properties file is in WEB-INF/classes, then as each web app is
> started the
> log4j default initializer will work properly for each app. (assuming log4j
> 1.1.3)
> 
> There should not be any log4j.properties file in the application server's
> classpath because if there is, that is the properties file that will be
> used for
> all the web apps instead of the one in WEB-INF/classes.
> 
> ----- Original Message -----
> From: "Tony" <deja_tony_123@yahoo.com>
> To: <log4j-user@jakarta.apache.org>
> Sent: Thursday, August 02, 2001 5:44 AM
> Subject: Problem with log4j not finding config file in WEB-INF/classes
> 
> 
> > Hi Folks
> >
> > I need a little help.  I am running tomcat and have a servlet which uses
> > the log4j library.  I have placed the configuration file
> >
> > log4j.properties         --(0)
> >
> > for log4j in the
> >
> > WEB-INF/classes          --(1)
> >
> > directory of my application, but when I call
> >
> > PropertyConfigurator.configure();
> >
> > in my servlet it dosent seem to find the configuration file placed in
> (1).
> > I know log4j is using default values since when I remove (0) from (1) the
> > servlet runs correctly and there are no errors reporting that
> > log4j cannot find a configuration file and the log4j class writes to the
> > tomcat.log
> > file.
> > I want it to pick up the file (0) in (1).
> > Does anyone know what I might be doing wrong?
> >
> > Cheers
> >
> > Tony
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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