Logging in Python is beautifully implemented with the logging library – https://docs.python.org/3/howto/logging.html It simply does anything you need and you do not need to write something yourself, like I did some time ago here in my VBA Boilerplate. So, if…