修复日志记录问题

This commit is contained in:
EstrellaXD
2023-05-11 10:07:11 +08:00
parent 531f27649e
commit e4e8a30d58
2 changed files with 3 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ from module.api import router
from module.conf import settings, setup_logger
from module.core import reset_log
log_level = logging.INFO
log_level = logging.DEBUG if settings.log.debug_enable else logging.INFO
setup_logger(log_level)
logger = logging.getLogger(__name__)

View File

@@ -37,7 +37,9 @@ class DownloadClient:
def __enter__(self):
if not self.authed:
logger.debug("Authing to downloader...")
self.auth()
logger.debug("Authed.")
return self
def __exit__(self, exc_type, exc_val, exc_tb):