wood burning stoves 2.0*
The moose likes Websphere and the fly likes WAS 5.0 & Log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS 5.0 & Log4j" Watch "WAS 5.0 & Log4j" New topic
Author

WAS 5.0 & Log4j

Adam Kreiss
Ranch Hand

Joined: Sep 12, 2005
Posts: 35
Hey everyone,

I'm using log4j in a web-app. In WSADIE, it is composed of a java project, an EJB project and a web project. In all three I have a log4j.properties file in the classpath.

I had assumed (incorrectly apparently) that the settings would be choosen by the "highest" project being actively run. That is, if I was just running some JUnit testcases against the Java project, Log4j would use its own log4j.properties file. The next level up I thought would be the EJB project and then the Web project that uses both of them. So I was expecting that when I ran the web project on WAS that log4j would pick up on the log4j.properties file in the WEB-INF/classes folder...

Apparently I was wrong and the EJB project ranks higher cause thats the one it picks up on.

I was just wondering if anyone could more accurately explain how log4j determines which file it uses?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WAS 5.0 & Log4j