This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes problem of log4j in tomcat 4.1.27 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem of log4j in tomcat 4.1.27" Watch "problem of log4j in tomcat 4.1.27" New topic
Author

problem of log4j in tomcat 4.1.27

Vrushank Joshi
Greenhorn

Joined: Oct 24, 2004
Posts: 11
Hello Friends,

I have created 2 context on the tomcat 4.1.27 and used log4j in both. The log file of both the context is different. But when i run tomcat. The log of both the context are print in the one log file only..
And the log will print in different log files as n when restarting tomcat.. Means while first time i start tomcat it prints log in first context's log file, and when i m restarting it for the second time it prints it in another context's log file..

If You people have any idea about it than plz let me know..
Regards,
Vrushank
[ November 30, 2004: Message edited by: Vrushank Joshi ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

do you have a log4j.jar file in each context's WEB-INF/lib directory, with the log4j.properties in the WEB-INF/classes directory?
Vrushank Joshi
Greenhorn

Joined: Oct 24, 2004
Posts: 11
Hii Mike,
Thank u for replying...
Yes, My property file is their...
But mind well this thing that
i m using the absolute path in which i want to put my log means like

log4j.appender.R.File=/usr/local/true_tomcat/webapps/iwap/logs/ideawap.log
in the second file i m using...
log4j.appender.R.File=/usr/local/true_tomcat/webapps/test/logs/ideawap.log

if i will use
log4j.appender.R.File=../webapps/iwap/logs/ideawap.log
log4j.appender.R.File=../webapps/test/logs/ideawap.log

than it works fine... But i dont want to use it... can u help me in the prob..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem of log4j in tomcat 4.1.27
 
Similar Threads
Printing Problem - java.lang.InternalError: Error code 9:
log4j and Cactus
Interesting log4j problem.
Printing Problem - java.lang.InternalError: Error code 9:
Issue of printing multiple lines in log file