wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Can we delete httpsd_access_log in tomcat while it is running? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Can we delete httpsd_access_log in tomcat while it is running?" Watch "Can we delete httpsd_access_log in tomcat while it is running?" New topic
Author

Can we delete httpsd_access_log in tomcat while it is running?

Jaideep Kshirsagar
Greenhorn

Joined: Aug 29, 2007
Posts: 27
Hi,

Can we delete 'httpsd_access_log' of tomcat server while tomcat is running?
Will it start logging freshly if we do so?

Why I want to do it is because the size of this file is pretty huge. This is kind of urgent, any quick help on this is very much appreciated.

It seems to me that Tomcat does not delete this file at start up as I can see lot of 'prehistoric' date logs lieing in there. Is this true?

Rgds,
Jai
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It depends.
If you're running as a windows service, the logs might be locked by the OS.
I'm not sure if they will be re-created or not.

A better approach would be to configure log4j.
With log4j, you can set up a rolling appender that will cause a new log to be generated each day. Then, you can easily archive the old ones without interrupting service.

See:
http://tomcat.apache.org/tomcat-5.5-doc/logging.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we delete httpsd_access_log in tomcat while it is running?
 
Similar Threads
Remote war deployment to tomcat
i want to load property file without restarting tomcat
How to Start Tomcat in Eclipse?
include activemq into tomcat
Help with the manager