-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make tracing
Optional for bevy_utils
#15879
base: main
Are you sure you want to change the base?
Make tracing
Optional for bevy_utils
#15879
Conversation
95c0c68
to
bb237d8
Compare
I don't quite follow the strategy here. It looks like we're unconditionally calling the |
Co-Authored-By: Alice Cecile <[email protected]>
Co-Authored-By: Alice Cecile <[email protected]>
I've also updated the migration guide since this is now only just barely a breaking change. |
Just a small sidenote, log has a much higher performance overhead than tracing for spammy logs and log filtering (see gfx-rs/wgpu#6046 (comment) for why). |
I think the re-exporting of log as tracing should be avoided. I would prefer to take the breaking change in this PR, and re-exports the common functions and macros between tracing and log as bevy_utils::log, and use that through the engine |
These are both excellent points. I will update the documentation to indicate that users should prefer to use the I'm leaning towards only exporting |
Objective
bevy_utils
to compile on platforms without atomic CAS operations (e.g., GameBoy Advancethumbv4t-none-eabi
)no_std
Bevy #15460Solution
tracing
optional (behind thetracing
feature, enabled by default).log
withinbevy_utils
, and exported it astracing
.Testing
cargo build --target thumbv4t-none-eabi
Migration Guide
If you were using
bevy_utils
with default features disabled, and you relied on thetracing
re-export, and you relied on atracing
item that is not available inlog
, enable thetracing
feature.Notes
tracing
has built-in support for capturing logs fromlog
and this is enabled by default. The biggest loss going fromlog
totracing
is the loss ofinfo_span
/etc. Otherwise, the crates are largely identical in behaviour, withlog
having no dependencies and more popularity on crates.io.