[pr-fix][startup] Keep the logging fallback when stderr is closed #249
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!249
Loading…
Reference in a new issue
No description provided.
Delete branch "andrewpozdnakov7-jpg/Darner:port/4979-preserve-log-startup-fallback"
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?
Contributor role (optional)
What it changes
When the requested log file cannot be opened, logging intends to continue without the file. If the launcher also closed stderr, eprintln panics while reporting that first error. Treat the warning write as best effort and keep the existing fallback.
Restores locally saved VIctory-NVIDIA work from December 1, 2026. Recovered revision: 5329ffd. Adapted by andrewpozdnakov7-jpg (GitHub profile).
How it was tested
ef55a1bonf3840d7.ef55a1b: ElGibbone reported 33 darner-core tests passing on macOS and clean Clippy on the macOS host and Windows cross-target, both with and without all features.Checklist
Checked for overlap
Code-read review of
ef55a1b. I did not build or run it.For the line it changes (
logging.rs:160), this is right:eprintln!panics when stderr is a broken pipe, andlet _ = writeln!(std::io::stderr().lock(), ..)does not. The secondopencall in the "log thread did not start" path is covered too.One note on scope. The title ("Preserve the fallback when stderr is closed") can be read as "startup survives a closed stderr", and it does not yet, because other
eprintln!calls on startup paths are still there:apps/darner/src/run.rs:1251and:1254(quiet_title_watchdog, called unconditionally atrun.rs:928). It prints either the "watchdog was not found" line or the "told to quit" line, unlessDARNER_TITLE_WATCHDOG=1or the size check returns early. Sodarner run --executewith a closed stderr pipe still panics here, just a moment after logging is set up.run.rs:895,903,926,1179,1216,1268;heap_budget.rs:118;main.rs:724,731;play.rs:1538-1539. Several of these are error or opt-in paths, so they matter less.Either a short note in the body that this covers only logging initialisation, or a follow-up with a small best-effort helper for those sites, would make the claim match the change.
For what it is worth, I also checked the
DARNER_LOG_SYNC=1path (init_sync) and found no problem: the console layer writes tostd::io::stderr, and in tracing-subscriber 0.3.23 (the locked version)fmt::layer()starts withlog_internal_errors: false(fmt_layer.rs:752), so a failed write there is ignored rather than printed. No change needed for that path.This comment was written with AI assistance (Claude Code).
Checked
ef55a1bon macOS (aarch64, Rust 1.98.1):cargo test -p darner-core --locked33 passed;cargo clippy -p darner-core --all-targets --locked -- -D warningsand the same with--all-featuresare clean, for the host and forx86_64-pc-windows-msvc(cargo-xwin). Not run on Windows, and the closed-stderr path itself was not exercised here.[pr-fix][startup] Preserve the fallback when stderr is closedto [pr-fix][startup] Keep the logging fallback when stderr is closedThanks for checking the scope and for the macOS run. I narrowed the title to the logging fallback and recorded the independent results in the description. The Windows broken-pipe fixture covers the file-open warning path. The macOS run adds the 33 darner-core tests and the host and cross-target Clippy checks.