commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Verhagen <>
Subject Re: [commons-logging] Problem renaming logfiles
Date Fri, 01 Apr 2005 15:09:39 GMT
Hi Simon,

On Apr 1, 2005 3:12 PM, Simon Kitching <> wrote:
> In general, I would recommend
>    LogFactory.release(Thread.currentThread().getContextClassLoader());
> be called on contextDestroyed in order to clean up commons-logging
> resources for a specific webapp. In the case of Tomcat, however, the
> call to release is done for you by the container so this is not
> necessary. Other containers might not be so helpful..

calling LogFactory.release(Thread.currentThread().getContextClassLoader());
did indeed not solve the problem...

> What the correct log4j cleanup method is depends on how you have
> installed/configured log4j. If log4j is in the WEB-INF/lib directory,
> then I think LogManager.shutdown() is the correct thing to call. If
> log4j is in a shared classloader, however, then you will need to consult
> the log4j documentation in order to figure out how to shut down logging
> for just the webapp being undeployed rather than every webapp in the
> container!

however, calling LogManager.shutdown() did! The multiple handles to
the same logfiles are gone.

Many thanks and regards,


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

View raw message