Next: , Previous: , Up: Cronjob Output   [Contents][Index]


2.3.2 Logging output to syslog

To send the output of all the cronjobs to the syslog, assign the name of the syslog facility to the built-in variable _MICRON_SYSLOG_FACILITY, e.g.:

_MICRON_SYSLOG_FACILITY = local0

Valid facility names are auth, authpriv, cron, daemon, ftp, lpr, mail, news, syslog, user, uucp, and local0 through local7.

Similarly, to log only a single cronjob output, define the variable _JOB_SYSLOG_FACILITY immediately before that cronjob.

In the produced log, each line of a cronjob output will be tagged with a fully-qualified name of the cronjob, constructed as:

file:line(prog)

You can alter this using the _JOB_SYSLOG_TAG variable. The following example illustrates the use of the two per-job syslog variables:

_JOB_SYSLOG_FACILITY = daemon
_JOB_SYSLOG_TAG = daily_cleanup
0 1 * * *  root  /usr/local/bin/cleanup