log request also

This commit is contained in:
Muzhen Gaming
2025-10-16 10:06:47 +08:00
parent 1f9f921829
commit 5901254405
3 changed files with 204 additions and 30 deletions

View File

@@ -30,6 +30,7 @@
- PowerShell: ``$env:BG_AGENT_DEBUG='1'`` (or ``$env:DEBUG='1'``)
- Cmd: ``set BG_AGENT_DEBUG=1``
- When enabled, logs are written to `%LOCALAPPDATA%\BgVisionAgent\agent.log` at DEBUG level.
- Additionally, the agent saves full OpenAI HTTP request/response JSON files (URL, headers, payload, status, headers, body) in `%LOCALAPPDATA%\BgVisionAgent\http`. Filenames include timestamps and attempt numbers. Secrets are redacted from headers.
- When not enabled, only warnings/errors go to stderr; no log file is written.
**Notes**