import logging logging.basicConfig(filename="all_logs.log", filemode="a", format="%(asctime)s - %(levelname)s - %(message)s", level=logging.DEBUG) mLogger = logging.getLogger("main_logger")