Recording both logs and unexpected errors in a Log file in Python Recording both logs and unexpected errors in a Log file in Python tkinter tkinter