-
-
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
Release logging is capped at info #1206
Comments
I think thats a fair take. I'm just a bit worried that most people won't think to do this and a significant percentage of bevy games will be released with measurably slower builds. Before changing this default, I'd like to see a frame time comparison of the feature enabled/disabled for something that renders a lot of entities (maybe bevymark). |
It should possible to re-export that feature in Bevy, and make the re-export enabled by default. That way it retains current behavior while also allowing users to disable it. |
This has been a mildly annoying issue for me lately. I only have a horribly underpowered laptop so when using rapier i must compile in release mode, and not having the log kinda sucks honestly. Ratysz is right i believe, bevy can re-export the features from tracing preserving the current behavior like this: [features]
default = ["tracing/release_max_level_info"]
release_max_level_debug = ["tracing/release_max_level_debug"]
release_max_level_trace = ["tracing/release_max_level_trace"] I'd like to fix this i just have a couple questions.
|
I think the Bevy root crate needs to re-export the features and the default one need to be set at this level to be disable-able by the end user
I would go with all the
I think so, to help discoverability, but not sure
Side note, but if you put in your Cargo.toml
your dependencies will be built in release but not your own code, which should allow for enough optimisations while still running your code in debug |
Oh snap, Sorry for waiting so long to reply, I must have missed this. Hmm i didn't know you could use wildcards there. My project is split into many sub crates that i want to be compiled in debug mode, i found the best way around this (for me) is to use the snippet above and specify my crates as being compiled in debug mode with
Thanks for your help @mockersf |
# Objective - Debug logs are useful in release builds, but `tracing` logs are hard-capped (`release_max_level_info`) at the `info` level by `bevy_utils`. ## Solution - This PR simply removes the limit in `bevy_utils` with no further actions. - If any out-of-the box performance regressions arise, the steps to enable this `tracing` feature should be documented in a user guide in the future. This PR closes #4069 and closes #1206. ## Alternatives considered - Instruct the user to build with `debug-assertions` enabled: this is just a workaround, as it obviously enables all `debug-assertions` that affect more than logging itself. - Re-exporting the feature from `tracing` and enabling it by default: I believe it just adds complexity and confusion, the `tracing` feature can also be re-enabled with one line in userland. --- ## Changelog ### Fixed - Log level is not hard capped at `info` for release builds anymore. ## Migration Guide - Maximum log levels for release builds is not enforced by Bevy anymore, to omit "debug" and "trace" level logs entirely from release builds, `tracing` must be added as a dependency with its `release_max_level_info` feature enabled in `Cargo.toml`. (`tracing = { version = "0.1", features = ["release_max_level_info"] }`)
# Objective - Debug logs are useful in release builds, but `tracing` logs are hard-capped (`release_max_level_info`) at the `info` level by `bevy_utils`. ## Solution - This PR simply removes the limit in `bevy_utils` with no further actions. - If any out-of-the box performance regressions arise, the steps to enable this `tracing` feature should be documented in a user guide in the future. This PR closes bevyengine#4069 and closes bevyengine#1206. ## Alternatives considered - Instruct the user to build with `debug-assertions` enabled: this is just a workaround, as it obviously enables all `debug-assertions` that affect more than logging itself. - Re-exporting the feature from `tracing` and enabling it by default: I believe it just adds complexity and confusion, the `tracing` feature can also be re-enabled with one line in userland. --- ## Changelog ### Fixed - Log level is not hard capped at `info` for release builds anymore. ## Migration Guide - Maximum log levels for release builds is not enforced by Bevy anymore, to omit "debug" and "trace" level logs entirely from release builds, `tracing` must be added as a dependency with its `release_max_level_info` feature enabled in `Cargo.toml`. (`tracing = { version = "0.1", features = ["release_max_level_info"] }`)
# Objective - Debug logs are useful in release builds, but `tracing` logs are hard-capped (`release_max_level_info`) at the `info` level by `bevy_utils`. ## Solution - This PR simply removes the limit in `bevy_utils` with no further actions. - If any out-of-the box performance regressions arise, the steps to enable this `tracing` feature should be documented in a user guide in the future. This PR closes bevyengine#4069 and closes bevyengine#1206. ## Alternatives considered - Instruct the user to build with `debug-assertions` enabled: this is just a workaround, as it obviously enables all `debug-assertions` that affect more than logging itself. - Re-exporting the feature from `tracing` and enabling it by default: I believe it just adds complexity and confusion, the `tracing` feature can also be re-enabled with one line in userland. --- ## Changelog ### Fixed - Log level is not hard capped at `info` for release builds anymore. ## Migration Guide - Maximum log levels for release builds is not enforced by Bevy anymore, to omit "debug" and "trace" level logs entirely from release builds, `tracing` must be added as a dependency with its `release_max_level_info` feature enabled in `Cargo.toml`. (`tracing = { version = "0.1", features = ["release_max_level_info"] }`)
Building a bevy app in release mode sets the static max level of tracing to
info
. Here is the warning I get:I've tried:
LogSettings::level
toDEBUG
(Obviously, wouldn't help, since the problem is at compile time)[dependencies.tracing]
withfeatures = ["release_max_level_debug"]
, but it seems that out of two levels, tracing still picksinfo
.As far as I understand, currently it is not possible to remove a feature from a transitive dependency, and because "release_max_level_info" is not a default feature of tracing, it's also impossible to disable it using
default-features = false
. Am I missing something ?If there is no solution, I propose removing
bevy_utils/tracing/release_max_level_info
, and simply move the responsibility to users.The text was updated successfully, but these errors were encountered: