-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix(esp-hal-log):Provide a default TAG name for USE_ESP_IDF_LOG logging macro #9686
Conversation
👋 Hello mairas, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
The ESP-IDF logging library has some nice features such as log forwarding. esp32-hal-log.h has long supported the USE_ESP_IDF_LOG macro, but due to subsequent changes, it requires a global TAG preprocessor macro to be defined. The macro name is too generic and just having a sane default would be preferable.
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Description of Change
The ESP-IDF logging library has some nice features such as log forwarding. esp32-hal-log.h has long supported the
USE_ESP_IDF_LOG
macro, but due to subsequent changes, it requires a globalTAG
preprocessor macro to be defined. The macro name is too generic and just having a sane default would be preferable.This PR changes the default tag macro name to
ARDUHAL_ESP_LOG_TAG
and, if it's not defined, sets it to"ARDUINO"
.Tests scenarios
I wasn't able to build arduino-esp32 master. Instead, I copied the file to Arduino-ESP32 Core v2.0.16 as provided by PlatformIO's
framework-arduinoespressif32
framework package. Test hardware was SH-ESP32 and HALMET (compatible with esp32 devkit devices).With the change applied, logging works as expected both when
USE_IDF_LOG
is set and when it isn't.Related links
Please provide links to related issue, PRs etc.
Closes #6893.