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/[EMAIL PROTECTED]/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to