From ca39d1f891f210948fa6333776329c718de78648 Mon Sep 17 00:00:00 2001 From: konjacpotato Date: Fri, 14 Nov 2025 21:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log/log_manager.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/log/log_manager.py b/log/log_manager.py index d7b5dd5..b580fc0 100644 --- a/log/log_manager.py +++ b/log/log_manager.py @@ -1,7 +1,7 @@ import logging.config import sys -import config.config +from config import config """ Usage: @@ -66,5 +66,11 @@ logger = logging.getLogger('root') logger.info(log_config_message) -def log(message: str): - logger.info(f'{config.config.scheduler_name} {message}') +def log(message: str) -> None: + """Helper wrapper to log a message prefixed with the scheduler name. + + Kept small and typed to be a safe, low-risk refactor: it unifies how + `config` is imported across the codebase (other modules use + `from config import config`). + """ + logger.info(f'{config.scheduler_name} {message}')