Skip to content

Commit 443b64a

Browse files
authored
Print to stderr from panic handler in LogPlugin (#11170)
# Objective When panic handler prints to stdout instead of stderr, I've observed two outcomes with this PR test #11169: - Sometimes output is mixed up, so it is not clear where one record ends and another stards - Sometimes output is lost ## Solution Print to stderr. ## Changelog - Panic handler in `LogPlugin` writes to stderr instead of stdin.
1 parent 6bc2686 commit 443b64a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_log/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl Plugin for LogPlugin {
118118
{
119119
let old_handler = panic::take_hook();
120120
panic::set_hook(Box::new(move |infos| {
121-
println!("{}", tracing_error::SpanTrace::capture());
121+
eprintln!("{}", tracing_error::SpanTrace::capture());
122122
old_handler(infos);
123123
}));
124124
}

0 commit comments

Comments
 (0)