Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log rotation

Status
Not open for further replies.

siberian

Programmer
Sep 27, 2003
1,295
US
How do you folks handle log rotation under Windows when you are deploying an app into an environment you do not control?

For apache its not so bad, you can limit logging but for tomcat, even when you set the log level to 0 and turn-off auto-deploy it still writes to the log on a pretty consistent basis which over time will cause support issues for our product.

Any tips? What is your logging deployment configuration? I prefer no logging at all with a switch that a support person can have them flip. I was hoping in tomcat that this would be the loglevel but that does not seem to be the case (unless I am doing it incorrectly!)

 
We've never managed to successfully get around this problem really purely in tomcat.

The two solutions I know of are :

1) periodically via a script shutdown tomcat, move the logs to another location / delete, then restart tomcat.
2) Have your applications write logs via log4j, which allows you to cycle the logs more easily (haven't personally done the setup on this, but I believe its possible).

The problem is that in Win32, tomcat maintains a file lock on the output logs so you cannot delete them with it running.
On linux/unix its obviously easier - we just do a "echo "" > logfile" which blows the logs away.

Not very good solutions I know, but there you go !



--------------------------------------------------
Free Database Connection Pooling Software
 
I will check out log4j, glad I am not the only one seeing this problem.

Tx sedj
 
siberian :

Do you remember in a thread a while ago, you were having problems with your connection pool ? I finally managed to get mine onto the web for download (see link on my signature) - would appreciate *testers*, if you have the time at some point to download it ...

Cheers

sedj

--------------------------------------------------
Free Database Connection Pooling Software
 
Awesome sedj, I will play with it this week.

Thanks for working to get this released!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top