File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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 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 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 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:
subject: WAS 5.0 & Log4j
It's not a secret anymore!