Is there any mod or program for Apache Httpd which rotate logs as well as purge them without the restarting of server processes? I have checked a few options, mod_autorotate, rotatelogs, mod_log_rotate and cronologs. Scratched out mod_autorotate because of the server restarts everytime log needs to be rotated. Scratched out mod_log_rotate, rotatelogs and cronologs because they don't have purging capabilities. I'm not entirely sure if I can use "logrotate" because it involves cron jobs, and it impossible for me to schedule cron jobs for a lot of Apache servers with a lot of applications running on them.
|show 2 more comments|
If you use syslog-ng or rsyslog there is no need for even a graceful restart or a HUP of Apache.
As soon as logrotate moves the old file, syslog-ng will create a new one. I like to have the date injected into the filename:
Some other nice advantages of these syslog-type programs are that you can stream the logs off to another server and you can combine the logs from many web servers into a single file on the logging server.