Enabling a seperate cron log in Debian

On Ubuntu, cron log can be seen in /var/log/cron. In Debian, cron log is by default part of syslog.

To enable a seperate cron log, do the following:

 #grep -in cron /etc/rsyslog.conf
58:#cron.*                              /var/log/cron.log
88:     cron,daemon.none;\

Now, edit that line (line num 58 in this example), and remove the comment symbol in front of cron.*

Now restart rsyslog service:

 #service rsyslog restart
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.

 

Note: If you can’t find /etc/rsyslog.conf, you will need to install rsyslog:

 #apt-get install rsyslog -y

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.