feat(logs): save every log in one zip for a bug report #354
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!354
Loading…
Reference in a new issue
No description provided.
Delete branch "Jiro113/LongshotLauncher:journaux-zip"
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?
The Logs page saves one log at a time, always as
longshot-log.txt, so a bug report takes five to eight saves and as many renames by hand. This adds one button that saves every log in a single zip.What changed
Save all logs (
ui/logs.slint,ui/log-viewer.slint,src/logbook.rs)SESSIONSandavailable()are unchanged.longshot-logs-YYYY-MM-DD-HHMM.zip(local time). The zip holds every fileavailable()lists: the selected build's game logs and the launcher's. Each file keeps its own name, and anindex.txtis added. The index gives the launcher version, the selected game's version tag (no folder name or path), when the zip was saved, and each file's size, modification time and label. Times are in UTC, as inlauncher.log. A name already taken gets a2-prefix (index.txtis reserved). A log that disappears between the list and the copy (rotation) is noted in the index instead of failing the whole zip. A log still being written (the launcher's own) is copied up to the size it had when its copy started. A log of 4 GiB or more is stored as a zip64 entry.Save a copy proposes a name for the selected log instead of
longshot-log.txt: its kind and the day it was last written, in local time. Examples:longshot-game-2026-11-28.txt,longshot-game-previous-…,longshot-build-…,longshot-launcher-…,longshot-play-shortcut-…. A log the list adds later keeps its own stem.Other
players::zip_timeis moved out of the save export (src/players/archive.rs) so both zips stamp their entries the same way. The code is unchanged.game::selected_taggives the index its game line.fr-CAadds rapport de bogue, as its other bug-report string does.scripts/translations.pyvalidates all 15. Every translated label fits the narrowest sidebar: at 900 px it leaves 213 px for the button. Measured with the bundled Inter Bold at 15 px, plus padding, the widest is French Enregistrer les journaux at 194 px.Testing
src/logbook.rs:save_all_zips_every_listed_log_with_an_index: a temporary launcher home is zipped. The test checks the entries, their bytes and the index lines, that an unlisted file is left out, that the home's path is not in the index, and that no temporary file is left. It doesn't depend on the order of the session list.save_all_refuses_an_empty_list_and_keeps_names_apart: an empty list is refused and leaves no file. It also covers duplicate names, a log namedindex.txt, and a missing log.proposed_names_say_which_log_and_when.python -I tests/test_launcher_core.py: catalogs validated.cargo test: 188 passed, 11 failed. The same 11 tests fail onmain(ed29aca) on this PC, where 185 pass: Windows-only failures in folders, recovery, registry, steam library, home, storage andrelease_py_fixture_verifies_exact_bytes_only. CI runs them on Linux.cargo fmt --all -- --checkandcargo clippy --locked --workspace --all-targets -- -D warnings: clean.LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: 46 tests OK.available()'s game branch isn't covered.🤖 Generated with Claude Code
The Logs page with Save all logs and its hint, on Windows 11 with a synthetic launcher home (no real logs):
Possibly related, for context: