From bc3f2529f8eccef48e180af8d9b5ef72ab1d3bf2 Mon Sep 17 00:00:00 2001 From: Levi Date: Sun, 24 Dec 2023 02:31:28 +0100 Subject: [PATCH] Fix circular import --- logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logging.py b/logging.py index af57b61..51dff2b 100644 --- a/logging.py +++ b/logging.py @@ -2,7 +2,7 @@ from logging.handlers import TimedRotatingFileHandler from logging import StreamHandler, Formatter -import app.session +import app.session as session import logging import os @@ -36,5 +36,5 @@ def format(self, record): Console = StreamHandler() Console.setFormatter(ColorFormatter()) -File = TimedRotatingFileHandler(f'logs/{app.session.logger.name}.log', when='D', backupCount=5) +File = TimedRotatingFileHandler(f'logs/{session.logger.name}.log', when='D', backupCount=5) File.setFormatter(Formatter('[%(asctime)s] - <%(name)s> %(levelname)s: %(message)s'))