Use log dir from config

This commit is contained in:
Paul Nameless 2020-06-03 14:10:02 +08:00
parent 705443b7df
commit 594f971b4c

View file

@ -51,7 +51,7 @@ def setup_log(level="DEBUG"):
for level, filename in zip(
(config.LOG_LEVEL, logging.ERROR), ("all.log", "error.log"),
):
handler = logging.FileHandler(filename)
handler = logging.FileHandler(os.path.join(config.LOG_PATH, filename))
handler.setLevel(level)
handlers.append(handler)