commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfredo Ledezma Melendez <>
Subject RE: [commons-logging] Problem renaming logfiles
Date Thu, 31 Mar 2005 15:32:47 GMT
Good morning,

I had the same problem before on a test environment (Tomcat running locally
on a Winbugs XP machine)...every day the same problem. At that moment, being
to damn stressed, I try the same code on a Linux box,  and no problem at all
renaming. To solve the problem in my test environment, I install WinM2K

In conclusion, I think the problem is more related with OS, than Tomcat
Alfredo Ledezma Meléndez.
Costumer Record Management
Consultor Externo de Sistemas de Atención a Clientes
RadioMovil DIPSA, S. A. de C. V.
Ejército Nacional No. 488, Col. Anahuac, C.P. 11570
México D.F.

 -----Original Message-----
From: 	Jeroen Verhagen []
Sent:	Thursday, March 31, 2005 1:53 AM
Subject:	[commons-logging] Problem renaming logfiles

Hi all,

I using commons-logging with log4j in my webapp. I'm using a
DailyRollingFileAppender and every morning when I start developping I
get the following message in my Tomcat console:

log4j:ERROR Failed to rename [logfile.txt] to ...

I did some investigation using the handle utility from and found that after a redeploy of my webapp,
Tomcat is keeping open multiple handles to the same logfile probably
causing the rename problem. If I restart Tomcat it has only one handle
to logfile as expected until I redeploy again etc.

Can someone please tell me what's causing this?

I'm using Tomcat 5.0.19 with commons-logging 1.0.3 in its common/lib
dir to also use commons-logging for Tomcat. In every class I declare a
Log like this:

private static Log logger = LogFactory.getLog(MyClass.class);

I tried calling LogFactory.releaseAll() from the webapps
ContextListener.contextDestroyed() and giving the webapp its own
commons-logging.jar but that didn't help.

Thanks for any help and regards,


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message