Rolling mod_jk log files

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-04-2006
ctippur@gmail.com
 
Posts: n/a
Default Rolling mod_jk log files

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0