Apache Log Rotation with mod_log_rotate and error.log
The initial configuration works on my logs/access.log file but does not rotate my logs/error.log file - what changes should I make to the default ErrorLog configuration to get the error.log file also rotated daily?
Charles Michener
I am using the mod_log_rotate.so file with RotateLogs On and RotatelLogsLocalTime On. My logs are rotating at 8:09pm EST instead of midnight, the time/zone on the server is correct.....any suggestions?
Also is there a paramater that can be used to set the day of the week?
Thanks
I'm not sure the timestamp of the log file indicates the log rotation. It's the last write time.
Not sure about this but, I can see on some of my sites with no traffic the log rotation file date reflecting the last log entry in the log file.
In other words, look in the log file with a last "write date" of 8:09pm EST. Do you have a log entry past the 8:09pm mark ?
Apache with the mod_log_rotate module does not use the same algorithm then IIS for the handling of log files. With IIS the log file cache is 128KB(or 64KB) per log file. This cache is not cleared until midnight. So all log files have a timestamp of around midnight. With Apache & mod_log_rotate, I notice that my sites have logs files with timestamps all over the map. With one consistency: my high traffic sites all have a timestamp past 11:59PM.
If you look inside the log file you will see that all is in order (I just checked a few log files my self): entries go from 00:00 to 23:59 for busy site. Even though timestamps of the log files are all over the map.
Let me know what you think,
C
Hi Charles,
I posted your email in the Forums. Please do not email these issues to me. Post directly in the forums, thanks.
This module does not rotate your error.log.
I personally would not need to rotate the error.log since it does not grow much. If you error.log grows rapidly, I would recommend troubleshooting the root cause.

delicious
digg
reddit
google
technorati
Joined: