commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Verhagen <>
Subject [commons-logging] Problem renaming logfiles
Date Thu, 31 Mar 2005 07:52:41 GMT
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:

View raw message