We're running Apache 2.2.9 (Win32) with a few virtual hosts configured on the one server. Each has it's own ErrorLog and CustomLog settings which are in the format of "logs/[domain name]-error.log" and "logs/[domain name]-access.log". Unfortunately these are now creating quite large files.
On IIS you can specify the log schedule, which can put them in a daily format of "yymmdd.log". Is there something similar I can do here?
It doesn't have to be daily either, weekly or monthly will do. I'd just like to break them up so that we can keep X amount instead of everything it's ever logged. A quick Google seems to bring up lots of Linux orientated answers involving log splitters, scripts and cron jobs which isn't too helpful for a Windows installation.
Update
Thanks to radius, I tweaked my httpd-vhosts.conf to use Apache's built in rotatelogs command, in the following format:
ErrorLog "|bin/rotatelogs logs/[domain name]-error.%Y-%m-%d-%H_%M_%S.log 5M"
CustomLog "|bin/rotatelogs logs/[domain name]-access.%Y-%m-%d-%H_%M_%S.log 5M" common
They'll create a new log file when the current one reaches 5MB. I know that's not daily as asked for, but that keeps them at a manageable size which will do. I did try the rotate after so many seconds but it didn't seem to be putting the time stamp in the file name correctly (specifically hours, minutes and seconds).
What you're looking for is the rotatelogs program that comes with apache http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
For instance, to rotate your logs daily at midnight:
What you want is called log rotation.
Google seems to list some revelant links about log rotation tools for windows.
This seems like an Apache specific solution, maybe it'll help you:
http://www.sprint.net.au/~terbut/usefulbox/apachelogrot.htm
Docs here:
http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
Try direct with