feat: Enhance logging and parameter tracking capabilities

- Refactor `gui_core.py` to improve code readability and maintainability by adding line breaks for long statements.
- Introduce `inspect_lines.py` script for inspecting specific line ranges in files.
- Add `generate_param_locations.py` to scan the repository and generate a report of function definitions, argparse parameters, and tracking calls.
- Implement `param_usage_tool.py` for analyzing `param_usage.json` records and scanning code for tracking calls.
- Create `simulate_reservation_preempted_flow.py` and `simulate_reservation_preempted_flow_dynamic.py` to validate behavior of reservation logic under specific conditions.
- Add global parameter tracking feature in `run_cli.py` to enable detailed usage tracing.
This commit is contained in:
Your Name committed 2026-01-03 19:12:58 +08:00
1 parent 68c8ccea66
commit 95b4517bdd
23 files changed
+1560 -849

No files matched your search

+10
View File
@@ -4,6 +4,16 @@ import os
import shutil
import sys
# 可选:全局参数/调用跟踪(仅在环境变量 PARAM_TRACK_ALL=1 时启用)
if os.environ.get("PARAM_TRACK_ALL") == "1":
try:
from douyin.utils.param_usage_tracer import start_tracing
start_tracing()
except Exception:
# 启用失败不影响主流程
pass
# ==== 首先配置日志系统,确保日志文件能正常写入 ==============================
try:
from douyin.logging import douyin_logging