-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Oneshot ADC log verbosity can't be controlled separately (IDFGH-11248) #12409
Comments
Hi again @cyberhuman ,
Yes, this is intended as this hal function is in critical section. And the “EARLY” log macros do not support per module setting of log verbosity. These macros will always log at the “default” verbosity level. So in a word, we will not make this hal layer function log to be controlled separately. On the other hand, we can provide a workaround by controlling the |
Hi @Icarus113!
This would be nice! |
Now there is a new commit that add a config |
It's done in this commit c14d7fb We'll close this issue, feel free to reopen if there's any further issue. @cyberhuman |
Thank you! |
Answers checklist.
IDF version.
v5.1
Espressif SoC revision.
ESP32-C3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
custom board
Power Supply used.
USB
What is the expected behavior?
When testing ADC on my board, I noticed calling
adc_oneshot_read
produces two lines on every invocation:I have
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
but I expect the log level of adc_hal to be controllable separately from the default log level.I noticed there exists a
CONFIG_HAL_LOG_LEVEL
setting but it's not configurable as soon asLOG_DEFAULT_LEVEL
is defined.Another issue is that
adc_oneshot_hal
usesHAL_EARLY_LOGD
instead ofHAL_LOGD
; the former doesn't checkCONFIG_HAL_LOG_LEVEL
and callsESP_EARLY_LOGD
instead, which checks the default log level (andLOG_LOCAL_LEVEL
, which isn't set byadc_oneshot_hal
and thus defaults toLOG_MAXIMUM_LEVEL
).What is the actual behavior?
when
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
, it's not possible to suppress the output ofadc_oneshot_hal
.Steps to reproduce.
oneshot_read
example: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/adc/oneshot_readidf.py menuconfig
adc_hal
.Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: