in a script you can specify to save output to a file with current date/time like:

LOGFILE=/path/to/logfiles/$(date '+%Y-%m-%d')_task.log

echo "this script was run" >> $LOGFILE;

to cleanup regularly is important in order to ensure the harddisk does not fill up.

delete all temporary files older than 30 days:

find /path/to/logfiles/* -mtime +30 -type f -delete;
admin