logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Tomcat log4j .
Date Wed, 17 Dec 2003 16:43:42 GMT
At 04:53 PM 12/17/2003 +0530, Antony Paul wrote:
>Hi all,
>     I am using Tomcat 4.1.27 + log4j 1.2.8+Win2k sp4. I have some problems
>with it.
>1, Log4j locks the log file so that I  cannot clear the content of the file.
>After some time I want to delete old debugging data while development.

You can close the appender in question. Calling LogManager.shutdown() will 
close down all appenders.

This code can be added to the 
<../../javax/servlet/ServletContextListener.htm#contextDestroyed(javax.servlet.ServletContextEvent)>contextDestroyed(<../../javax/servlet/ServletContextEvent.htm>ServletContextEvent

sce) method of a

ServletContextListener.

See for example:

http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg10001.html

Hope this helps,


-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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


Mime
View raw message