-
-
Notifications
You must be signed in to change notification settings - Fork 1
Logging and Debugging
Every run writes to logs/byterescue.log, rotated at 2 MB (byterescue/applog.py). The folder is
created at runtime and is git-ignored. Open it directly with the Recovery Center's Open Log button, or
in any text editor.
Before this existed (pre-0.6.0), an exception inside a Tkinter callback only ever printed to stderr —
invisible when launched by double-clicking ByteRescue.bat without a console window, so an error could
occur with literally no trace anywhere. Now:
-
Tk.report_callback_exceptionis hooked, so a GUI-callback exception is logged and shown in a dialog -
sys.excepthookandthreading.excepthookare hooked for exceptions outside GUI callbacks - Scan start/finish/write and results-table sync events are logged
Since 0.7.0, the same events that go to the log file also stream live to the console — whenever
ByteRescue is run from one, which is the normal case: ByteRescue.ps1 launches it inside the elevated
PowerShell window it opens, and leaves that window open. Console output is INFO level and up by default.
Set the BYTERESCUE_DEBUG environment variable to any non-empty value before launching for a fully
verbose DEBUG-level stream, both to the console and the log file:
$env:BYTERESCUE_DEBUG = "1"
python -m byterescueDEBUG-level lines cover previously-silent user actions in the Recovery Center: changing recovery mode,
changing source kind, choosing a source file, choosing a destination folder, and selecting a drive — so a
log from a real session shows what the user actually clicked, not just what the scan engine did
internally.
Every run logs its environment once at startup: ByteRescue version, Python version/executable, OS platform string, whether running elevated, and the working directory. This is exactly the information that would otherwise need to be asked for when someone reports a bug — include it (or the log line itself) in bug reports.
Attach or quote the relevant logs/byterescue.log lines, ideally reproduced with BYTERESCUE_DEBUG set.
See Troubleshooting for the full checklist, and be mindful of sensitive
data — don't include personal information or unrelated file paths from your log.
Getting Started
Recovery
Help
Developers