3

I can't get the logging to work on the ESP32. Here is my example:

#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
#include <esp_log.h>
void setup() {
 Serial.begin(115200);
 ESP_LOGE("Test", "This is a test!");
 delay(1000);
}
void loop() {
 ESP_LOGE("Test", "This is a repesting test!");
 delay(1000);
 Serial.println("Serial.print");
 delay(1000);
}

It only prints Serial.print every two seconds, but not the log messages.

asked Mar 26, 2023 at 15:39
3
  • Without any experience but after rushing through the documentation: Don't you need to call esp_log_level_set()? Commented Mar 27, 2023 at 6:32
  • 2
    You can set the log level from the Arduino IDE via Tools -> Core Debug Level. By default it is set to NONE. Commented Mar 28, 2023 at 0:28
  • I just had to add my thanks to hcheung! Changing the #defines and using esp_log_level_set() made no apparent difference. Setting Core Level Debug made all the difference, seeming to override the #defines mentioned above. -- John B Commented Mar 23, 2024 at 22:04

1 Answer 1

3

Thanks to hcheung! I had to set the Core Debug Level in the Tools menu.

answered Mar 30, 2023 at 10:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.