Managing cron entries in syslog

Published on Author adventurerLeave a comment

In the latest Raspbian distributions the default syslog configuration writes cron messages, including success messages, in to /var/log/syslog. To eliminate this, edit /etc/rsyslog.conf

% sudo vi /etc/rsyslog.conf

uncomment the line for /var/log/cron.log, and add cron as an exclusion to /var/log/syslog as follows:

cron,*                             /var/log/cron
*.*, cron,auth,authpriv.none       /var/log/syslog

and then force a restart of syslog using

% sudo systemctl restart syslog

For housekeeping /var/log/cron.log also needs to be added to /etc/logrotate.conf, however this appears to be the default now in Raspbian.

Thanks to serverfault for this information.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *