I know this has been discussed here before, but I haven't found a solution that will work for me. I already have a python script that I wrote, and I currently have it run at boot. What I would like to do is log all outputs, which include any print statements to the console, or any error messages that would come up. I do like the Logging module, and would prefer to use that over looking at all outputs on the console. Any suggestions?
Asked
Active
Viewed 591 times
1
-
The answer here may be of help: http://stackoverflow.com/questions/14058453/making-python-loggers-output-all-messages-to-stdout-in-addition-to-log – Matthew Plourde May 20 '13 at 19:36
-
Thank you Matthew, this is actually pretty useful. However, I'm still a little confused on where the log file for this is located. – user2125538 May 20 '13 at 19:45
1 Answers
0
If you manage your script using supervisor it will automatically handle all logging of stdout/stderr for you.
Additionally, it can automatically restart your script if it were to crash

dm03514
- 54,664
- 18
- 108
- 145
-
How would I be able to find out if my system is using Supervisor? Also, where I be able to find the log file? – user2125538 May 20 '13 at 19:42
-
@user2125538 your system is not using supervisor unless you install it, and configure it, in your supervisor configuration file you get to choose the location of the error logs and the output logs – dm03514 May 20 '13 at 20:06