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

Equivalent of log::log_enabled!() for defmt #924

Open
ia0 opened this issue Jan 16, 2025 · 0 comments
Open

Equivalent of log::log_enabled!() for defmt #924

ia0 opened this issue Jan 16, 2025 · 0 comments

Comments

@ia0
Copy link
Contributor

ia0 commented Jan 16, 2025

Are there any plans of having a way to know at compile-time if a given level of logging is enabled? Something similar to log::log_enabled().

This can be useful when a warning should only be displayed if the log level is at least warning and if some run-time condition is fulfilled, but without having to compute the run-time condition if the log level is less than warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant