tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Robert <arob...@cogsci.ucsd.edu>
Subject Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
Date Thu, 03 Mar 2005 17:32:04 GMT
>>> OK, thanks to your vote of confidence in the method, I dug further 
>>> and
>>> discovered that my WEB-INF/classes/log4j.properties was never being
>>> found.  If I put the log4j.properties into the same jar (in
>>> WEB-INF/lib) with the class that was instantiating the Logger, it
>>> worked correctly.
>>>
>>
>> That's extremely odd.  What version of Tomcat are you running?  
>> That's a bug
>> because WEB-INF/classes should be put in the classpath before jars in
>> WEB-INF/lib.
>
> This is 5.5.7, with the 1.4 compatibility package on MacOS.  I've 
> experienced similar issues before with different tomcat versions, 
> though I had forgotten that in this case..
>
> Note I do NOT unpack the app from a war, just copy the full hierarchy 
> straight under webapps.  Also, the WEB-INF/classes/log4j.properties 
> file was a symblic link.  Maybe one of these makes a difference?

It turns out it WAS the symbolic link.  I get the following results:

- symbolic link, relative (e.g., WEB-INF/classes/log4j.properties -> 
resources/log4j.properties): not found

- symbolic link, absolute (e.g., WEB-INF/classes/log4j.properties -> 
/usr/java/tomcat/webapps/foo/WEB-INF/classes/resources/log4j.properties 
- OR - regular file: found and prevents common/classes/log4j.properties 
from being found (tomcat-general stuff goes into webapp's log file)

- file in jar with class that instantiates Logger: both tomcat's 
(common/classes/) and webapp's log4j.properties are found and heeded

Sorry about the bother if this is just standard knowledge of how tomcat 
operates on Unix.


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


Mime
View raw message