| Author |
where to place log4j.properties file
|
S.S Rao
Greenhorn
Joined: Aug 01, 2005
Posts: 2
|
|
hi, I am using log4j in my J2EE application. We use RAD for our deevlopment and the application server is WAS 6.0. We used to place the log4j.properties in the properties folder of the application server and it was working fine. But now we are asked to put the properites file with in the application EAR itself. How to do that ?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Put it in the same directory where you would put jar files in the EAR. The properties file just has to be in the classpath so that should work correctly. You should probably have the log4j.jar file in the EAR as well, it's probably higher in the classloader hierarchy than the WAR file is.
|
 |
Benson Fung
Ranch Hand
Joined: Apr 10, 2003
Posts: 207
|
|
Hi Paul, I am also have the same case. I try to put the properties file in the MDB jar file. However, it looks the the JBOSS only read its built-in log4j.xml. Do you know how to fix this problem? thanks Benson
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8143
|
|
|
That's right, JBoss uses the log4j.xml that comes shipped with it. Have a look at ScopedLoggingConfig, if you want to use your own log4j.properties or log4j.xml
|
[My Blog] [JavaRanch Journal]
|
 |
 |
|
|
subject: where to place log4j.properties file
|
|
|