Closed JurajSadel closed 1 year ago
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 :) ).
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.