Skip to content

Support CONFIG_DYNAMIC_DEBUG in _debug logging functions #453

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

Open
wedsonaf opened this issue Jul 22, 2021 · 3 comments
Open

Support CONFIG_DYNAMIC_DEBUG in _debug logging functions #453

wedsonaf opened this issue Jul 22, 2021 · 3 comments
Labels
• lib Related to the `rust/` library.

Comments

@wedsonaf
Copy link

wedsonaf commented Jul 22, 2021

Current pr_debug doesn't support it yet, it's either on or off depending on debug_assertions.

@ojeda ojeda added prio: normal • lib Related to the `rust/` library. labels Jul 22, 2021
@ojeda
Copy link
Member

ojeda commented Jul 22, 2021

I have #122 keeping track of different printing-related features, let me update that one.

@ojeda
Copy link
Member

ojeda commented Jul 22, 2021

Done -- I will keep this open, since that way people can automatically close it individually from a PR.

@mrwigglewaffles
Copy link

mrwigglewaffles commented May 25, 2025

I have started working on this. I have a working wip here.

The main problem is that the c version uses the __func__ macro to log the function name. Rust has no equivalent macro. It looks like there were a couple of proposals to add something like this to rust but they got dropped. 1, 2. I did try the trick of using core::any::type_name::<T>() to get the function name but it does not work in a const context.

Even without that, I probably will send it to the mailing list sometime soon.

zulip thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
• lib Related to the `rust/` library.
Development

No branches or pull requests

3 participants