I have configured rsyslog.conf file to store log messages to mysql but I am getting some annoying log message in my MySql table. which looks like this.

Nov  3 14:48:01 username CRON[17405]: (root) CMD (location of my app >/dev/null 2>&1)
Nov  3 14:48:01 username CRON[17406]: (root) CMD (application name and loc >/dev/null 2>&1)
Nov  3 14:48:01 username CRON[17407]: (root) CMD (appname/location >/dev/null 2>&1)

The applications that are generating logs are the programs which I have created and are running as Daemon process.

Why am I getting these logs? What should I write in rsyslog.conf to not store these type of logs in my table.


It is because cron daemon's activity goes to system logs. It is not annoying in my opinion, rather life saving if - let's say - you have to know if crontab is executed or not. Beside that you can control the output by editing the /etc/rsyslog.d/50-default.conf file to this:

*.*;auth,authpriv.none,mail.none,cron.none -/var/log/syslog

The relevant part is the cron.none directive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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