aspose file tools*
The moose likes Websphere and the fly likes Log4j writing problem in websphere 7.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Log4j writing problem in websphere 7.0" Watch "Log4j writing problem in websphere 7.0" New topic
Author

Log4j writing problem in websphere 7.0

siva kumarl
Greenhorn

Joined: Nov 29, 2008
Posts: 21
Dear Friends,

I am not able to write log file with specifed location, I have 2 EAR applications deployed in Websphere Application Server 7.0. Each EAR file contian a WAR file inside it. The log files have different path for all the applications. For Example:

Following is the log file path mentioned in the log4j.properties file for all the 3 EAR applications:

EAR application 1: log4j.appender.log.File=C:/EAROne/log/EAROne.log
EAR application 2: log4j.appender.log.File=C:/EARTwo/log/EARTwo.log

The problem is, if i execute any EAR application. all the logs are written in the same log file. Suppose if i execute application EAROne, the logs generated from the application are written in the EAROne.log. Similarly, if i execute applications EARTwo and EARThree, the logs generated from those applications are also written in the same EAROne.log file.

Even i have change the parent class loading settings for the server as below

Servers -> Server Types -> WebSphere application servers -> servername -> General Properties
Server-specific Application settings as
Classloader policy : Multiple
Class loading mode : Classes loaded with local class loader first(parent last).

How to make the applications write their respective logs in their own log files according to the log file paths mentioned in their respective log4j.properties file?


Thanks in Advance,
Siva Kumar.
basudeva kar
Greenhorn

Joined: Jul 23, 2012
Posts: 2
Not Sure if you can write your logs to different log files if you have deployed multiple applications in the same jvm instance in websphere application server. But if you deploy each application in a different jvm instance then it will work.
siva kumarl
Greenhorn

Joined: Nov 29, 2008
Posts: 21
Hi Basudev,

Thanks for your reply. All applications in same profile, will this make any problem. I hope this will not a problem. Could you please let me know if any alternate solution.


Thanks
Siva Kumar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4j writing problem in websphere 7.0
 
Similar Threads
RAD7 - Trying to get log4j to work
websphere multiple server instances and log4j
J2EE & log4j
Log4j problem in Websphere
Test 252: Mock exam