We have the following in our httpd.conf files:-
ErrorLog "| /usr/HTTPServer/bin/rotatelogs /wslogs/instance_name/hostname
_%m%d%Y_error.log 86400"
CustomLog "| /usr/HTTPServer/bin/rotatelogs /wslogs/instance_name/hostname
_%m%d%Y_access.log 86400" combined
This writes the piped logs to /wslogs/instance_name using the format described above.
We see that in no time these log files tend to occupy whole lot space under /wslogs and we are unaware of that. And then when we do our deployments that also has a step to restart server, the server fails to restart with an error:- httpd (no pid file) not running Error writing to the file /wslogs/instance_name/server_name_12022016_error.log
Then we have to manually clean the wslogs folder. Is there a way to automatically handle this and make sure these logs are there only for last 10 days, or in other words a way to delete logs older than 10 days.
Any suggestions/solutions here would be greatly appreciated.