On 04/10/2018 03:04 PM, Darren Smith wrote:
- Has anyone come up with a good log rotation strategy that doesn't necessitate a restart of the service?
I think Abhilash has answered this, but for completeness, here's what I use on lists.mailman3.org which uses nginx and gunicorn
Mailman's logs
/opt/mailman/mailman-bundler/var/logs/*.log {
missingok
sharedscripts
su mailman mailman
postrotate
/opt/mailman/mailman-bundler/bin/mailman reopen &>/dev/null || true
if [ -r /opt/mailman/mailman-bundler/var/gunicorn.pid ]; then
PID=cat /opt/mailman/mailman-bundler/var/gunicorn.pid
kill -s USR1 $PID
fi
endscript
}
mailman-web log
/var/log/mailman-web/*.log { missingok notifempty delaycompress su mailman mailman }
And here's mail.python.org with apache and mod_wsgi
Mailman's logs
/opt/mailman/mailman-bundler/var/logs/*.log { missingok sharedscripts su mailman mailman postrotate /opt/mailman/mailman-bundler/bin/mailman reopen &>/dev/null || true endscript }
mailman-web log
/var/log/mailman-web/*.log { missingok notifempty delaycompress su mailman mailman }
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan