• Post Reply Bookmark Topic Watch Topic
  • New Topic

WAS 5.0 & Log4j  RSS feed

Adam Kreiss
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!