mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #137] [MERGED] [cli] Add a --debug flag that writes a shareable diagnostic log #141
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/137
Author: @Glitchy-Sheep
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/debug-flag📝 Commits (4)
9f0ce51feat: 🔍 --debug flag writes a detailed log file131996cfix: 🐛 Network errors name the real cause instead of blaming the internet4f90994feat: 🔍 The debug log sees every request through a session observer841e380test: ✅ Cover --debug reporting and document the flag📊 Changes
13 files changed (+313 additions, -25 deletions)
View changed files
📝
CHANGELOG.md(+8 -0)📝
README.md(+2 -0)📝
boosty_downloader/main.py(+10 -24)📝
boosty_downloader/src/application/di/app_environment.py(+4 -0)📝
boosty_downloader/src/cli/cli_options.py(+37 -0)➕
boosty_downloader/src/cli/error_reporting.py(+43 -0)📝
boosty_downloader/src/infrastructure/loggers/base.py(+5 -1)➕
boosty_downloader/src/infrastructure/loggers/debug_file.py(+75 -0)➕
boosty_downloader/src/infrastructure/loggers/request_tracing.py(+48 -0)➕
test/unit/cli/__init__.py(+0 -0)➕
test/unit/cli/error_reporting_test.py(+62 -0)➕
test/unit/loggers/__init__.py(+0 -0)➕
test/unit/loggers/request_tracing_test.py(+19 -0)📄 Description
[cli] Add a --debug flag that writes a shareable diagnostic log
Summary
Issue #109: a user hit a DNS failure and the app answered with a generic connection message - nothing to diagnose, nothing to attach to the report. Now network errors say what actually broke, and
--debugwrites a log file made for attaching to GitHub issues.How it works
--debugon the root command startsboosty-downloader-debug.login the current directory: app version, platform, Python, argvTraceConfigobserver on the shared HTTP session logs every request - API calls, file downloads, retries - the callers never know the log existsBefore / After
Before: any network failure printed the same generic message; the user from #109 was told to check their internet while their browser worked fine (browsers often use their own DNS).
After: the screen names the failing host and the likely fix;
--debugproduces a log with every request and full tracebacks, safe to attach publicly.Tests
redacted_urltests: the signed query is cut off, plain URLs stay intactapi.boosty.invalid(guaranteed NXDOMAIN) through the real network stack raisedClientConnectorDNSError, showed the new message and left the request line plus traceback in the log🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.