This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes log4j updating wrong file 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 » BEA/Weblogic
Bookmark "log4j updating wrong file" Watch "log4j updating wrong file" New topic

log4j updating wrong file

Prashant Saraf
Ranch Hand

Joined: Sep 25, 2006
Posts: 52

I am using weblogic 8.1 and log4j, I had two application. Both had Log4j and respective log file say a.log and b.log. when i use one of them then proper logging was perform, when both application are running. which ever application requested second will updating log file. and it updates both the logs in single log file.
can any one help me on this.
Prashant Saraf
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Where have you put the log4j.jar ?

Rahul Bhattacharjee
LinkedIn - Blog
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
The log4j jar should not be in any shared location , both the application should have its own copy of log4j jar.One jar per classloader / application.
I agree. Here's the link:
subject: log4j updating wrong file
Similar Threads
log4j configuration for two application on one cluster
problem of log4j in tomcat 4.1.27
log question
How t o have multiple log files in WSAD and WAS using log4j ?
how can i limit the sizes of the logs ?