This is a discussion on Rolling mod_jk log files within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi All! I have to compess and roll mod_jk log file every day. The Operating system is Red Hat Enterprise ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All!
I have to compess and roll mod_jk log file every day. The Operating system is Red Hat Enterprise Linux AS release 4. I found 2 feasible approaches to do this: 1. Using logrotate utility /home/x/logs/apache/mod_jk.log { daily rotate 5 nomissingok ifempty olddir /home/x/logs/apache create 600 root root delaycompress postrotate <--- HERE.. DO WE NEED TO RESTART APACHE? #/usr/local/apache2/bin/apachectl graceful # there will be some activity on the saved log, so don't compress immediately # if you want to compress, sleep for 600 endscript } This works fine except that I am not sure about the postrotate section. Is it imperative that I need to restart yapache in the post rotate section? What happens if I dont restart apache at the end? This can be critical because these are production nodes and we cannot take downtime on these servers. 2. Using JkLogFile directive JkLogFile "|/usr/local/apache/bin/rotatelogs /home/x/logs/apache/mod_jk.log.%Y-%m-%d-%H_%M_%S 86400" Questions: a. When will this get kicked off? b. Can I/How do I implement compression of mod_jk.log file along with this? Thanks for your answers in advance. Shekar |