fix: 修正日志存储地址,改为绝对路径

This commit is contained in:
墨梓柒
2025-05-07 00:27:48 +08:00
parent 1e2cdeeea5
commit 54eaff8cf2

View File

@@ -80,7 +80,8 @@ _custom_style_handlers: dict[Tuple[str, str], List[int]] = {} # 记录自定义
# 获取日志存储根地址 # 获取日志存储根地址
current_file_path = Path(__file__).resolve() current_file_path = Path(__file__).resolve()
LOG_ROOT = "logs" ROOT_PATH = os.path.abspath(os.path.join(current_file_path, "..", ".."))
LOG_ROOT = str(ROOT_PATH) + "/" + "logs"
SIMPLE_OUTPUT = os.getenv("SIMPLE_OUTPUT", "false").strip().lower() SIMPLE_OUTPUT = os.getenv("SIMPLE_OUTPUT", "false").strip().lower()
if SIMPLE_OUTPUT == "true": if SIMPLE_OUTPUT == "true":