bevy/crates
SilentSpaceTraveller 8661e914a5
bevy_log: refactor how log layers are wired together (#19248)
# Objective

Current way to wire `Layer`s together using `layer.with(new_layer)` in
the `bevy_log` plugin is brittle and not flexible. As #17722
demonstrated, the current solution makes it very hard to do any kind of
advanced wiring, as the type system of `tracing::Subscriber` gets in the
way very quickly (the type of each new layer depends on the type of the
previous ones). We want to make it easier to have more complex wiring of
`Layers`. It would be hard to solve #19085 without it

## Solution
It aims to be functionally equivalent.
- Replace of using `layer.with(new_layer)` . We now add `layer.boxed()`
to a `Vec<BoxedLayer>`. It is a solution recommended by
`tracing_subscriber::Layer` for complex wiring cases (See
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/layer/index.html#runtime-configuration-with-layers)
- Do some refactoring and clean up that is now enabled by the new
solution

## Testing
- Ran CI locally on Linux
- Ran the logs examples
- Need people familiar with the features `trace`, `tracing-chrome`,
`tracing-tracy` to check that it still works as expected
- Need people with access to `ios`, `android` and `wasm` to check it as
well.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
2025-06-16 21:30:55 +00:00
..
bevy_a11y Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_animation Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_anti_aliasing Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_app Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_asset allow access to the source error of AssetLoaderError and downcasting (#19471) 2025-06-16 21:24:01 +00:00
bevy_audio Fix iOS simulator build (#19498) 2025-06-10 17:01:37 +00:00
bevy_color Make sequential_dispersed fn constant (#19659) 2025-06-15 16:56:07 +00:00
bevy_core_pipeline Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_core_widgets Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_derive bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_dev_tools Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_diagnostic bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_dylib bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_ecs Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_encase_derive bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_gilrs Make GILRS and WINIT_WINDOWS public (#19575) 2025-06-12 20:05:00 +00:00
bevy_gizmos Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_gltf bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_image Add missing docs for ImageLoader (#19499) 2025-06-09 19:46:33 +00:00
bevy_input Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_input_focus Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_internal Initial raytraced lighting progress (bevy_solari) (#19058) 2025-06-12 21:26:10 +00:00
bevy_log bevy_log: refactor how log layers are wired together (#19248) 2025-06-16 21:30:55 +00:00
bevy_macro_utils bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_math Improve Bevy's double-precision story for third-party crates (#19194) 2025-06-08 02:02:47 +00:00
bevy_mesh Initial raytraced lighting progress (bevy_solari) (#19058) 2025-06-12 21:26:10 +00:00
bevy_mikktspace deny(missing_docs) for bevy_mikktspace (#19654) 2025-06-15 16:50:23 +00:00
bevy_pbr Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_picking Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_platform bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_ptr bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_reflect deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
bevy_remote Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
bevy_render Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_scene Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_solari Initial raytraced lighting progress (bevy_solari) (#19058) 2025-06-12 21:26:10 +00:00
bevy_sprite Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_state Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_tasks Added async_executor to the array of features enabled by multi_threaded within bevy_tasks crate to prevent compile-time error when default-features are disabled. (#19334) 2025-06-10 00:54:46 +00:00
bevy_text Adding PartialEq to some UI and Text types (#19552) 2025-06-09 20:08:17 +00:00
bevy_time Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_transform bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_ui Let query items borrow from query state to avoid needing to clone (#15396) 2025-06-16 21:05:41 +00:00
bevy_utils bevyengine.org -> bevy.org (#19503) 2025-06-05 23:09:28 +00:00
bevy_window Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00
bevy_winit Event Split: Event, EntityEvent, and BufferedEvent (#19647) 2025-06-15 16:46:34 +00:00