""" TBD """ __author__ = "Lukas Mahler" __version__ = "0.0.0" __date__ = "25.09.2021" __email__ = "m@hler.eu" __status__ = "Development" # Default import sys import logging from datetime import date def unhandledException(exc_type, exc_value, exc_traceback): if issubclass(exc_type, KeyboardInterrupt): sys.__excepthook__(exc_type, exc_value, exc_traceback) return log.critical("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)) def setupLogger(): """ """ global log log = logging.getLogger() now = date.today().strftime("%Y-%m-%d") handler = logging.FileHandler(f"myTS3_{now}.log", encoding="utf-8") logformat = logging.Formatter("%(asctime)s %(levelname)7s %(message)s", "%d-%m-%Y %H:%M:%S") handler.setFormatter(logformat) log.addHandler(handler) log.setLevel(logging.DEBUG) return log if __name__ == "__main__": exit()