Hi, Have you tried using a ServletContextListener which calls org.apache.log4j.LogManager.shutdown() in its contextDestroyed method?
This should allow log4j a chance to close any resources when you stop the webapp context. Regards Andy > -----Original Message----- > From: Fredrik Jonson [mailto:[EMAIL PROTECTED] > Sent: 08 February 2005 11:36 > To: [email protected] > Subject: Stale file handles when using log4j and tomcat? > > > Hello, > > When checking with lsof, I see that log4j seem to maintain file > descriptors to log files even after I have stopped and even > removed the webbapp which logs to that particular logfile. > > I use log4j (1.2.7/9) and tomcat 4.1.31 on linux and java-1.4.2. > Log4j is placed in the WEB-INF/lib directory, and isn't shared > between apps, though several webbapps use log4j for logging. > > Is there any trick to make log4j close logfiles when the webbapp > is stopped? > > I seem to recollect a previous discussion on a related topic on > this list, but now I cant find it again. > > -- > Fredrik Jonson > -- > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
