Files
MoneyPrinterTurbo/.github
Alessandro BoniandGitHub 6951758b91 fix(logging): keep log records when the project root is on another mount (#1260)
os.path.relpath raises ValueError on Windows when the record's file and
PROJECT_ROOT resolve to different mounts. That happens whenever the project is
launched through a mapped network drive or a subst drive: the call frame keeps
X:\MoneyPrinterTurbo\..., while realpath resolves PROJECT_ROOT back to C:\...
Loguru catches the formatter error and discards the record, so the terminal and
the WebUI log panel both go silent. Fall back to the absolute path there, and
also when the file sits outside the project root, where "./" glued onto a ".."
climb is no easier to read than the original path.

Render the relative path with forward slashes as well, so Windows logs show
"./app/services/task.py" like every other platform instead of the mixed
"./app\services\task.py". test_webui_task.py already asserted the POSIX form
but is not part of the Windows smoke job, so the drift went unnoticed; add it
to that job to keep the regression covered on the platform where it appears.
2026-08-25 10:49:38 +08:00
..