From bede50777da60a5ae67393066f87d3536bdcb338 Mon Sep 17 00:00:00 2001 From: lazywalker Date: Sun, 26 Jul 2020 22:16:31 +0800 Subject: [PATCH] fix import bug --- ft8.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ft8.py b/ft8.py index 679437a..dedc1da 100755 --- a/ft8.py +++ b/ft8.py @@ -55,14 +55,13 @@ def setup_logger(): }, } logging.config.dictConfig(logconf) - logging except ImportError: + import logging, logging.handlers FORMAT = "%(asctime)-15s %(levelname)-5s %(process)5d [%(threadName)s] %(message)s" logging.basicConfig(level=logging.DEBUG, format=FORMAT) # log to file filehandler = logging.handlers.TimedRotatingFileHandler("log/ft8.log", when='d', interval=1, backupCount=7) - filehandler.setLevel(logging.DEBUG) filehandler.suffix = "%Y-%m-%d_%H-%M-%S.log" filehandler.setFormatter(logging.Formatter("%(asctime)-15s %(levelname)-5s %(process)5d [%(threadName)s] %(message)s"))