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

Replace dprint module with esp-println and log crate #8

Closed
JurajSadel opened this issue Dec 2, 2022 · 2 comments · Fixed by #14
Closed

Replace dprint module with esp-println and log crate #8

JurajSadel opened this issue Dec 2, 2022 · 2 comments · Fixed by #14
Assignees

Comments

@JurajSadel
Copy link
Contributor

No description provided.

@MabezDev
Copy link
Member

Maybe because esp-println uses UART0, it's better not to use esp-println here. Instead we can keep using the dprint module, but put it behind a feature, such that all the logs can be compiled in if the feature is enabled, or removed if the feature is disabled.

@jessebraham
Copy link
Member

jessebraham commented Dec 19, 2022

One option I've seen is to just #[cfg] away the body of the macro if the logging feature is not enabled, so that all the calls to dprintln!, etc. are still present in the code base but are ultimately expanded to nothing (which is basically what @MabezDev said :) ).

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

Successfully merging a pull request may close this issue.

3 participants