This is code for a tutorial that explains how to use sys.excepthook from the python standard library to make sure that you have the ability to get all unhandled exceptions to be reported by your logging.
The tutorial can be found here: https://www.customprogrammingsolutions.com/tutorial/logging-uncaught-exceptions-python-applications