• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Can we delete httpsd_access_log in tomcat while it is running?

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
and POOF! You're gone! But look, this tiny ad is still here:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic