Send cron output to a file
Send cron output to a log with >> file 2>&1. The order matters: 2>&1 before the file leaves stderr behind, and cron mails or drops it.
A cron job writes to standard output and standard error, and you want both in one log file instead of in mail nobody reads.
cat > log.cron <<'EOF'
* * * * * (echo out; echo err >&2) >> /tmp/right.log 2>&1
* * * * * (echo out; echo err >&2) 2>&1 >> /tmp/wrong.log
EOF
crontab log.cron
sleep 65
echo "right.log:"; cat /tmp/right.log
echo "wrong.log:"; cat /tmp/wrong.logright.log:
out
err
wrong.log:
outRedirections are applied left to right. In the first line >> file points standard output at the file, then 2>&1 points standard error at the same place. In the second line standard error is copied to where standard output is at that moment, which is still cron's pipe, and only then is standard output moved to the file, so err never reaches it. The behaviour is that of the shell, described in the redirection section of POSIX.
The log only grows. Rotate it with logrotate, or write a dated file name, and mind the percent sign rule when you do. Output that never reaches a file goes to the local mail spool when a mail program is installed, and is discarded otherwise.