Skip to content

Commit

Permalink
fix import bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lazywalker committed Jul 26, 2020
1 parent 1f9cb93 commit bede507
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ft8.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit bede507

Please sign in to comment.