feat(T-003): 建立日志与运行产物目录策略
- src/paths.py: 集中管理 logs/、artifacts/ 路径与产物命名 (artifacts/<task_id>/<时间戳>_<step>.png|.xml),_safe 安全化防路径穿越, 运行时自动创建且被 .gitignore 忽略。 - src/logging_config.py: 统一日志格式(含 task_id/step),控制台 + logs/app.log, 缺上下文时由 filter 补默认值,setup 幂等;约定不记录敏感信息。 - src/main.py: 启动时初始化运行目录与日志。 - 运行方式统一为 python -m src.main(绝对导入下的唯一干净入口), 同步替换 00/03/05/current-state 文档命令与 dev.bat。 - 文档:04 §七 补 paths.py 与产物命名规则;tasks/progress/current-state 更新。 验证:compileall OK;unittest Ran 17 tests OK;python -m src.main exit=0,logs/app.log 写入正常。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
41bc666322
commit
b1e38ffd7a
@@ -115,7 +115,7 @@ MVP 不做:
|
||||
```powershell
|
||||
python -m compileall src
|
||||
python -m unittest discover -s tests -t .
|
||||
python src/main.py
|
||||
python -m src.main
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
Reference in New Issue
Block a user