I am using crontab to autostart the program, using the following command in cronatb
@reboot sudo python /home/Desktop/Appllication.py
Is it possible to write all the logs (errors and other stuff) by appending something to the above command, so that cron writes all errors/ any related events to a log ?
UPDATE: The code prints values in the python idle terminal when run individually using the print command. How do I make this data which is printed on the terminal to be written to the log file. for ex, if my code is like print "food morning" , how do I get this to be written into the log file instead of printing on terminal.
TEST CODE:
import time
while(1):
print "testing"
time.sleep(5)