From 60ef5bd7e935589c1b8d6bc7cb9fde8f3eab16bf Mon Sep 17 00:00:00 2001 From: chenxudong Date: Thu, 5 Jun 2025 09:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=BE=E7=BD=AE=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/start.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/start.py b/src/start.py index 807eb8a..af9d996 100644 --- a/src/start.py +++ b/src/start.py @@ -11,6 +11,7 @@ import webview # 获取当前脚本所在的目录 new_java_path = 'D:/database/jdk/bin/java.exe' +app_log_dir = 'D:/database/logs' port = 12396 def get_resource_path(relative_path): """ 获取资源绝对路径,适用于开发环境和PyInstaller打包后 """ @@ -33,7 +34,7 @@ def start(): creation_flags = subprocess.CREATE_NEW_PROCESS_GROUP # 重定向输出到日志文件 formatted_time = datetime.now().strftime("%Y%m%d%H%M%S") - log_file = rf'D:\database\app_{formatted_time}.log' + log_file = rf'{app_log_dir}\app_{formatted_time}.log' with open(log_file, "a") as log: process = subprocess.Popen( java_command,