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

Performance: Logging pruned release builds #156

Open
SurfingNerd opened this issue Dec 17, 2024 · 0 comments
Open

Performance: Logging pruned release builds #156

SurfingNerd opened this issue Dec 17, 2024 · 0 comments
Labels
performance good performance improvement

Comments

@SurfingNerd
Copy link
Collaborator

It is possible to not even include the ressource intensive log preparations into the binary, by configuring builds to not include low level logs in the binary. More about: https://docs.rs/log/latest/log/index.html

For example, a crate can disable trace level logs in debug builds and trace, debug, and info level logs in release builds with the following configuration:

[dependencies]
log = { version = "0.4", features = ["max_level_debug", "release_max_level_warn"] }
@SurfingNerd SurfingNerd added the performance good performance improvement label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance good performance improvement
Projects
None yet
Development

No branches or pull requests

1 participant