jQuery in Action, 3rd edition
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

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?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: WAS 5.0 & Log4j
It's not a secret anymore!