-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Change camera order ambiguity warning to warn_once!
#22649
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
base: main
Are you sure you want to change the base?
Change camera order ambiguity warning to warn_once!
#22649
Conversation
|
Would you be interested in doing the |
Just so i'm clear - split this so that adding bevy_log dependency is completely by itself and then a separate PR to remove direct tracing? I don't mind doing it but just want to make sure I understand the request. |
|
You can add bevy_log and remove direct tracing usage in the same PR because those things are directly related I think. I mostly just want this current PR to not have that noise. |
I'm working on the PR for just replacing tracing with bevy_log but ran up against one issue - bevy_render/src/renderer/mod.rs has a reference to tracing::event! here: tracing::event! is not re-exported from bevy_log - any concern if i add it to the list of re-exports from bevy_log? it compiles and i think matches the intent of your ask |
|
just added #22652 PR with the replacement of tracing - once that merges i can rebase this PR on top of it |
IceSentry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would wait on the tracing PR to merge and then update the description of this PR but other than that LGTM
## Objective Replace direct `tracing` dependency with `bevy_log` in `bevy_render` for consistency with other bevy crates. This was split out from #22649 at @IceSentry's request. ## Solution - Add `bevy_log` dependency to `bevy_render` - Replace all `use tracing::*` imports with `use bevy_log::*` - Remove `tracing` dependency from `bevy_render` - Add `event` to `bevy_log`'s tracing re-exports (needed by `renderer/mod.rs`) ## Testing Built with `--all-features` and ran `3d_scene` example. --------- Co-authored-by: Alice Cecile <[email protected]> Co-authored-by: IceSentry <[email protected]>
|
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
Objective
Fixes #22635
Camera order ambiguity warnings currently fire every frame, flooding the console.
Solution
warn!towarn_once!insort_camerasso the warning only fires once per ambiguityui_target_cameraexample since the warning is no longer spammyTesting
Ran the
ui_target_cameraexample and triggered a camera order ambiguity by clicking to give two cameras the same order. Verified the warning appears exactly once in the logs despite running for many frames afterward.