Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my small Debian squeeze web server, I have syslog-ng installed (not syslogd, like in this question). Generally, my logs are nice and quiet, with

-- MARK -- 

lines. My /var/log/syslog, however, is littered with this

Sep 23 23:09:01 bookchin /USR/SBIN/CRON[24885]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete > /dev/null)
Sep 23 23:09:01 bookchin /USR/SBIN/CRON[24886]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm > /dev/null)
Sep 23 23:17:01 bookchin /USR/SBIN/CRON[24910]: (root) CMD (   cd / && run-parts /etc/cron.hourly)

kind of garbage. What's the clean way to avoid it (again, with syslog-ng)?

share|improve this question
up vote 7 down vote accepted

For syslog-ng it's slightly different than regular syslog: You need to add cron to the filter associated with /var/log/syslog. In /etc/syslog-ng/syslog-ng.conf, replace this:

filter f_syslog3 { not facility(auth, authpriv, mail) and not filter(f_debug); };


filter f_syslog3 { not facility(cron, auth, authpriv, mail) and not filter(f_debug); };

and you're done.

share|improve this answer

Another option is preventing cron from logging anything except errors:

change /etc/default/cron:

  # Or, to log standard messages, plus jobs with exit status != 0:
  # EXTRA_OPTS='-L 5' 
  # For quick reference, the currently available log levels are:
  #   0   no logging (errors are logged regardless)
  #   1   log start of jobs
  #   2   log end of jobs
  #   4   log jobs with exit status != 0
  #   8   log the process identifier of child process (in all logs)

By default the EXTRA_OPTS line is ""


Someone incorrectly edited this answer to make it seem as if -L 0 would prevent cron from logging "altogether." This is incorrect. Note the description of 0 in the text i posted:

 #   0 no logging (errors are logged regardless)

Or just use 4:

  #   4   log jobs with exit status != 0

The OP wanted to avoid the log message every minute for the start of a cron job. Logging errors only or errors and non-zero exit statuses is a good option.

share|improve this answer
On one my system, cron manpage states Logging will be disabled if the loglevel is set to zero (0). and nothing else. This seems to be some really old release of cron by @jfs, version 3.0pl1-105. – ulidtko Oct 15 '14 at 14:52
When I open /etc/default/cron, I have This file has been deprecated. Please add custom options for cron to /etc/init/cron.conf and/or /etc/init/cron.override directly. See the init(5) man page for more information However, I didn't found anything related to disabling auth logging :/ . Any idea ? – Asenar Aug 25 '15 at 8:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.