-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Bevy should deny eprintln
and println
and prefer log
and/or tracing
#17446
Comments
eprintln
and println
since we always have access to log
and/or tracing
...eprintln
and println
and prefer log
and/or tracing
there are some places, mostly parts of bevy_ecs, app initialization or in tests, where we can't assume a logger has been setup. well, and logger setup itself 😄 |
Since this should be the exception rather than the rule, perhaps we could |
Yup! |
eprintln
and println
and prefer log
and/or tracing
eprintln
and println
and prefer log
and/or tracing
Can you deny macros in deny.toml? If you can, I think you can |
It looks like there's a provided lint, |
Probably not as there's a |
|
# Objective - Prevent usage of `println!`, `eprintln!` and the like because they require `std` - Fixes #17446 ## Solution - Enable the `print_stdout` and `print_stderr` clippy lints - Replace all `println!` and `eprintln!` occurrences with `log::*` where applicable or alternatively ignore the warnings ## Testing - Run `cargo clippy --workspace` to ensure that there are no warnings relating to printing to `stdout` or `stderr`
Originally posted by @bushrat011899 in #17442 (comment)
The text was updated successfully, but these errors were encountered: