I have this in each virtual hosts in my Apache HTTPD confs:
CustomLog "|$tee -a /www/domainX/logs/apache/acces_log" combined
On servers with more than 100 domains, there is an issue with slow restarts or graceful restarts because restarting all processes takes about 10-30 seconds (depending on the number of domains). When I remove all custom logs from the configurations, the restart takes 1 second.
There is one option — using rotatelogs — but I need the newest log file to be named "access_log". Is there any easy way to do this without tee and faster?