feat(log): a log line can be debug or trace, and the movie networks a card leaves out are trace lines #177
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!177
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:feat/log-levels"
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?
Why
On AMD and other cards that can't run the movie upscaler's networks, a build's details fill with a dozen
vk: program … not translated: a network left out on this cardlines. Those lines are expected, but players read them as errors. This gives the log levels, so the launcher can show info and above by default and keep the detail lines one click away.What changed
hos_log_at(level, …)inhost/hos_thread.c/host/hos.h(levelsHOS_LOG_ERROR…HOS_LOG_TRACE). Info lines are written exactly as before. Other levels get a tag after the thread's tag:[hos host] [trace] vk: ….HOS_TRACE_CALLlines are trace.logf_at(LogLevel, …)ingpu/vk/vk_main.cpp(vlogf), declared ingpu/vk/vk_internal.h. It writes the same tag at the start of the text the host logs.logfis unchanged. There is no change toMkwVkHost, so no API bump.gpu/vk/vk_shader.cpp: a network left out on purpose (network_left_out) is a trace line, with a count of its own. Before, the dozen of them used up the 30 lines a real translation failure gets. Real failures stay info.compiling(trace), dispatch/fallback drawleft out: still compiling(debug) invk_draw.cpp;pools mapped(vk_memory.cpp); sparse texture written / slow staging arena (vk_texture.cpp); Opus decoder (debug) andGetOpusPacketSize(trace) innn_codec.c; recording copies let go innvn_native.c(debug).tests/test_log_levels.pycompiles the host'shos_vlogandlog_level_tagwithhost/hos.h's levels, and the renderer'svlogf,logfandlogf_at, from the source. It checks every tag, the whole line an info, trace and debug call writes ([hos host] [trace] …\n, the tag after the thread's), and that the network line is trace (outside trial translations, as before) with its own count.tests/test_prepare_stall.pynow also cuts outvlogfand theLogLevelenum thatlogfuses.docs/development.md.The launcher side, which reads the tags (level picker, search, follow at the bottom), is MagicBeanDev/LongshotLauncher: LongshotLauncher #30.
Flags and settings
None. The level is chosen in code; the log file keeps every line.
Measurements
main:
c67cd4a0(2026-11-13)this PR: feat/log-levels @
084481ddHardware: no game run (see Testing). The change writes log text only, with no new work on any frame or in the preparation.
Method: game-free checks.
tests/test_log_levels.pycompiles the realhos_vlog,log_level_tag,vlogf,logfandlogf_atand checks the lines they write.c67cd4a0084481dd[hos host] vk: program 095fca6f01e3030a not translated: a network left out on this card[hos host] [trace] vk: program 095fca6f01e3030a not translated: a network left out on this cardlogf)vk: device 1vk: device 1(unchanged)Testing
Tested:
python -I -B tests/run_all.pyon Linux (CachyOS, clang): 466 passed, 2 failed, 69 skipped. The 2 failures are environment-only and fail onmaintoo:test_bake_portability.py(nozstandardmodule here) andtest_builder_log_read_only.py(no Tk).vk_main.cpp,vk_shader.cpp,vk_draw.cpp,vk_memory.cppandvk_texture.cppcompile with the build's renderer flags (clang++ -fsyntax-only). The launcher's view of these lines was tested with a fake build in a headless window (launcher PR).Not tested: a real preparation or a game run. This PC is NVIDIA, which doesn't print the network lines, and a full build wasn't run so as not to load the PC.
hos_thread.c'shos_vlogis compiled by the check.nn_codec.candnvn_native.cweren't compiled outside the game build (they need the generateda64_suyu.h); their change is twohos_log_atcalls.Needs other testers:
[trace] … a network left out on this cardlines only under Trace, expecting none under Info (request to open)Screenshots
A fake build in the launcher, on the launcher PR's branch (the game lines are this PR's format):
Risk and rollback
Only lines with a tag change, so a script that matches
^\[hos \w+\] vk:on one of the lines moved to debug or trace no longer matches it. No script or check in this repository does (grepped). An older launcher or the Builders show the tag as text. Reverting the commit is enough.Reviewer notes
Start with
host/hos_thread.c(log_level_tag,hos_vlog) andgpu/vk/vk_main.cpp(vlogf). More lines can move to debug or trace in follow-ups. This PR moves only the per-item ones that were clear choices.Issues
None.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
hos_log_at and the renderer's logf_at write a level after the thread's tag ("[hos host] [trace] vk: ..."); info lines are unchanged. The launcher's build log reads it to show info and above. Per-program and per-decoder lines a player can't act on are debug or trace, HOS_TRACE's calls are trace, and the networks left out on purpose no longer use up the 30 lines a failed translation gets. Co-Authored-By: Claude Opus 5.5 <[email protected]>Self-review fixes: a network left out in a trial translation stays quiet as before; the check now compiles hos_vlog with hos.h's levels, so the tag's place after the thread tag is tested. Screenshots and the launcher PR link added.
WIP: feat(log): a log line can be debug or trace, and the movie networks a card leaves out are trace linesto feat(log): a log line can be debug or trace, and the movie networks a card leaves out are trace lines