Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we delete httpsd_access_log in tomcat while it is running?

 
Jaideep Kshirsagar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic