commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfredo Ledezma Melendez <alfredo.lede...@mail.telcel.com>
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
Professional.

In conclusion, I think the problem is more related with OS, than Tomcat
thought.
____________________________________________
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 [mailto:jeroenverhagen@gmail.com]
Sent:	Thursday, March 31, 2005 1:53 AM
To:	commons-user@jakarta.apache.org
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
www.sys-internals.com 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,

Jeroen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message