Tag Info

New answers tagged

1

I've seen this trick used before on a separate blog: Create a config file for logrotate, let us call it httpry.conf /var/log/httpry/*.log { size 2 rotate 84 compress missingok copytruncate } Then from cron (may need to be in root's crontab depending on the permissions and ownership of the log files), a crontab of: 0 */2 * * * ...


0

In case anyone has a similar problem, I fixed it. Turns out the issue was the daemon wasn't shutting down fast enough. When start is called in the logrotate file, the program is technically still running. I solved it by adding a sleep In the init.d file and re writing reload to call stop and then call start. The final solution looked like: ... reload) ...


2

Tomcat rotates its log files itself: by default at least localhost_access_log_ (configured using an AccessLogValve in server.xml, look in /opt/alfresco/tomcat/conf) and the log files configured using a FileHandler in logging.properties (catalina.out and so on). I'm not sure how you'd go about compressing the log files natively within Tomcat's logging ...



Top 50 recent answers are included