log to stderr instead of stdout (#8886)
# Objective - `bevy_log` writes logs to `stdout` (with ANSI formatting), which gets in the way with program output and complicates parsing. - Closes #8869 ## Solution - Change `bevy_log` to write to `stderr` instead of `stdout` --- ## Changelog Changed: - Logs write to `stderr` rather than `stdout` on desktop targets ## Migration Guide - Capture logs from `stderr` instead of from `stdout` - Use `2> output.log` on the command line to save `stderr` to a file
This commit is contained in:
parent
50c50cdcb6
commit
910f984709
@ -159,7 +159,7 @@ impl Plugin for LogPlugin {
|
|||||||
#[cfg(feature = "tracing-tracy")]
|
#[cfg(feature = "tracing-tracy")]
|
||||||
let tracy_layer = tracing_tracy::TracyLayer::new();
|
let tracy_layer = tracing_tracy::TracyLayer::new();
|
||||||
|
|
||||||
let fmt_layer = tracing_subscriber::fmt::Layer::default();
|
let fmt_layer = tracing_subscriber::fmt::Layer::default().with_writer(std::io::stderr);
|
||||||
|
|
||||||
// bevy_render::renderer logs a `tracy.frame_mark` event every frame
|
// bevy_render::renderer logs a `tracy.frame_mark` event every frame
|
||||||
// at Level::INFO. Formatted logs should omit it.
|
// at Level::INFO. Formatted logs should omit it.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user