TL;DR In Python, How to use logging (or other methods) in order to receive full report/log that includes every step the compiler made prior to program getting stuck (or hang