This is how you do it.
Edit this file;
vi /etc/rsyslog.d/50-default.conf
Find the line starting with
#cron.*
and uncomment it.This will cause all cron events to be logged to /var/log/cron.log (unless you changed the path) however the same events will also continue to be logged to syslog.
In the same file, find the line that looks like this;
*.*;auth,authpriv.none -/var/log/syslog
Alter the line so that it looks like this;
*.*;auth,authpriv.none;cron.none -/var/log/syslog
Restart the logging service;
service rsyslog restart
Now cron will log to /var/log/cron.log but not to syslog
2 comments:
Thanks, exactly what I was looking for.
Thank you very much for this!
Post a Comment