You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Philippe de Rochambeau <pd...@iht.com> on 2005/06/07 18:50:45 UTC
[users@httpd] cronologing and logrotating Apache logs
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org