On Mon, Apr 24, 2023 at 11:48 AM Per Jessen <per@opensuse.org> wrote:
Andrei Borzenkov wrote:
On Mon, Apr 24, 2023 at 11:04 AM Per Jessen <per@opensuse.org> wrote:
Wrt $SUBJ - my logrotate changes didn't work. I created a /etc/logrotate.d/syslog with new definitions for /var/log/messages and /var/log/mail, but it seems it was ignored.
Were those definitions in /usr/etc/logrotate.d/syslog?
Yes, /usr/etc/logrotate.d/syslog has definitions for a lot of log files [1], including those two. I thought I would be able to override with
Let's start from the beginning. How are you running logrotate? Is it the default logrotate.timer which calls logrotate.service? Do you have your own cron job or something else? Do you have /etc/logrotate.conf? Does it explicitly include any files? How do you test your modifications? Are you calling logrotate manually? If yes, how exactly?
office24:/etc/logrotate.d # cat syslog /var/log/messages /var/log/mail { compress dateext maxage 365 rotate 30 missingok notifempty daily sharedscripts postrotate /usr/bin/systemctl reload syslog.service > /dev/null endscript }
[1] from /usr/etc/logrotate.d/syslog :
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall /var/log/acpid /var/log/NetworkManager /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k sharedscripts postrotate /usr/bin/systemctl reload syslog.service > /dev/null endscript }
-- Per Jessen, Zürich (8.3°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes