Cron.log does not exist in /var/log

Currently, if you run Debian on a Slicehost server, the log file for cron tasks is disabled by default. I am not sure about other distributions on other hosts, or even other distributions on Slicehost. Regardless, here is how you re-enable cron logging on your slice.

  1. Navigate to /etc  (cmd: cd /etc)
  2. Back-up syslog.conf  (cmd: cp syslog.conf syslog.conf.bak)
  3. Edit syslog.conf  (cmd: pico syslog.conf)
  4. Remove the comment that disables this line: cron.* /var/log/cron.log
  5. Save the file and exit
  6. Restart the syslog daemon  (cmd: /etc/init.d/sysklogd restart)
  7. Check to make sure that the file /var/log/cron.log exists. This is where your log entries will be.

Enjoy!

2 thoughts on “Cron.log does not exist in /var/log

  1. This may not be revelant but i figured i’d post this anyway. If you’re using ubuntu 8.10 you may be in for some issues with the network manager. For some unknown reason it stops functioning. You will need to manually set you’re resolv.conf with your ISP’s DNS servers. That file is located in /etc/network/resolv.conf

  2. And if you are using Debian Lenny, steps 3 and 6 must be changed slightly:

    1. Navigate to /etc (cmd: cd /etc)
    2. Back-up rsyslog.conf (cmd: cp syslog.conf rsyslog.conf.bak)
    3. Edit rsyslog.conf
    4. Remove the comment that disables this line: cron.* /var/log/cron.log
    5. Save the file and exit
    6. Restart the syslog daemon (cmd: /etc/init.d/rsyslog restart)
    7. Check to make sure that the file /var/log/cron.log exists. This is where your log entries will be.

Comments are closed.