I am running a python script on a linux server without nohup:
nohup python3 ./myscript.py > ./mylog.log &
It works and the script writes the log file, but the problem is that the python error / exception messages do not seem to be written to the log file. How could I achieve this?
Is this something related to stderr? (but he says: "nohup: redirecting stderr to stdout" when I run the script.)
This is a long script, and after a while the script stops working due to some kind of problem and with the missing error messages I donβt know why. Problems always arise after a few days, so this is really a pain for debugging.
edit: Could this have something to do with a flash? Since my own prints use flash, but maybe python errors are not so that they do not appear in the file after the script is interrupted?
source share