feat: add debug logging to python env, scraper, and runner

Problem: with debug = true, there is not enough diagnostic output to
troubleshoot environment or execution issues. The resolved python path,
scraper commands, and compile/run shell commands are not logged.

Solution: add logger.log calls at key decision points: python env
resolution (nix vs uv vs discovery), uv sync stderr output, scraper
subprocess commands, and compile/run shell strings. All gated behind
the existing debug flag so they only appear when debug = true.
This commit is contained in:
Barrett Ruth 2026-02-18 17:33:44 -05:00 committed by Barrett Ruth
parent 976838d981
commit 622620f6d0
3 changed files with 10 additions and 0 deletions

View file

@ -30,6 +30,8 @@ local function run_scraper(platform, subcommand, args, opts)
vim.list_extend(cmd, { subcommand })
vim.list_extend(cmd, args)
logger.log('scraper cmd: ' .. table.concat(cmd, ' '))
local env = vim.fn.environ()
env.VIRTUAL_ENV = ''
env.PYTHONPATH = ''