Skip to content
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

Inconsistent use of tracing and bevy_log #11298

Closed
BD103 opened this issue Jan 11, 2024 · 2 comments · Fixed by #12254
Closed

Inconsistent use of tracing and bevy_log #11298

BD103 opened this issue Jan 11, 2024 · 2 comments · Fixed by #12254
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Code-Quality A section of code that is hard to understand or change

Comments

@BD103
Copy link
Member

BD103 commented Jan 11, 2024

Bevy seems to inconsistently switch between using bevy_utils::tracing and bevy_log. It would be good to pick one and use it consistently throughout the project.


Also it appears Bevy is using a mix of both bevy_utils::tracing and bevy_log for accessing logs. Interesting. Might wanna fix that sometime.

Originally posted by @doonv in #11296 (comment)

@alice-i-cecile alice-i-cecile added A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Code-Quality A section of code that is hard to understand or change labels Jan 11, 2024
@james7132
Copy link
Member

james7132 commented Mar 2, 2024

I'm generally for moving this all our tracing usage to bevy_utils, since bevy_log focuses on actually setting up the LogPlugin and the outward facing IO for tracing. This way compilation shouldn't be blocking on compiling bevy_log's extra features when most other crates are really only there to add log messages and instrumentation.

@mockersf
Copy link
Member

mockersf commented Mar 2, 2024

an issue I have with using bevy_utils for logs is that it exposes bevy_utils::error, bevy_utils::warn, bevy_utils::info and bevy_utils::dbg (somehow this one didn't get authorised for vowels) and those are not the same things as the log macros

github-merge-queue bot pushed a commit that referenced this issue Mar 2, 2024
# Objective
Fixes #11298. Make the use of bevy_log vs bevy_utils::tracing more
consistent.

## Solution
Replace all uses of bevy_log's logging macros with the reexport from
bevy_utils. Remove bevy_log as a dependency where it's no longer needed
anymore.

Ideally we should just be using tracing directly, but given that all of
these crates are already using bevy_utils, this likely isn't that great
of a loss right now.
spectria-limina pushed a commit to spectria-limina/bevy that referenced this issue Mar 9, 2024
# Objective
Fixes bevyengine#11298. Make the use of bevy_log vs bevy_utils::tracing more
consistent.

## Solution
Replace all uses of bevy_log's logging macros with the reexport from
bevy_utils. Remove bevy_log as a dependency where it's no longer needed
anymore.

Ideally we should just be using tracing directly, but given that all of
these crates are already using bevy_utils, this likely isn't that great
of a loss right now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Code-Quality A section of code that is hard to understand or change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants