Hello,

has anyone ever used cronolog in conjunction with logrotate to rotate, compress, and delete Apache log files after 15 days?

In my httpd.conf file, the CustomLog and ErrorLog entries are as follows:

CustomLog "|/usr/bin/cronolog /usr/local/apache2/logs/access.%Y%m%d.log" common

ErrorLog "|/usr/bin/cronolog /usr/local/apache2/logs/error.%Y%m%d.log"

I am thinking of configure logrotate as follows:

/usr/local/apache2/logs/*.log {
        weekly
        compress
        missingok
        notifempty
        sharescripts
        postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2> /dev/null` 2> /dev/null || true
        endscript
}

How can I prevent logrotate from rotating the logs since cronolog is already doing that (I want it to compress the logs, though)?

Do I need a prerotate command?

Many thanks.

Philippe


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to