import logging ROOT_LOG_LEVEL = "INFO" PRETTY_LOG_FORMAT = ( "%(asctime)s.%(msecs)03d [%(levelname)-8s] %(name)+25s - %(message)s" ) logging.basicConfig(level=ROOT_LOG_LEVEL, format=PRETTY_LOG_FORMAT, datefmt="%H:%M:%S") logging.captureWarnings(True)