Replies: 2 comments
-
Arduino doesn't use IDF logging. You can determine the log level with CORE_DEBUG_LEVEL. See https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h. |
Beta Was this translation helpful? Give feedback.
-
For other people reference, The log Level is defined in ARDUHAL_LOG_LEVEL macro and the leves has been redefined as:
Not the best example about how to use the precompiler macros, but easy to test: void setup() { } void loop() { } |
Beta Was this translation helpful? Give feedback.
-
esp_log_level_get("*") always returns ESP_LOG_ERROR. unless you define other loglevel in tools/core log level.
`#include <Arduino.h>
void setup() {
Serial.begin(115200, SERIAL_8N1);
Serial.print("ESP32 test get loglevel.\n");
switch (esp_log_level_get("*")) {
case ESP_LOG_NONE:
Serial.print("ESP_LOG_NONE\n");
break;
case ESP_LOG_ERROR:
Serial.print("ESP_LOG_ERROR\n");
break;
case ESP_LOG_WARN:
Serial.print("ESP_LOG_WARN\n");
break;
case ESP_LOG_INFO:
Serial.print("ESP_LOG_INFO\n");
break;
case ESP_LOG_DEBUG:
Serial.print("ESP_LOG_DEBUG\n");
break;
case ESP_LOG_VERBOSE:
Serial.print("ESP_LOG_VERBOSE\n");
}
}
void loop() {
// put your main code here, to run repeatedly:
}`
How to get the real log level?
Beta Was this translation helpful? Give feedback.
All reactions