Commit
Usable for library developers who write code not dependent on Arduino. Adding 3 lines to the includes will permit their debug messages to be visible in Arduino IDE or when enabled under IDF
- Loading branch information
There are no files selected for viewing
5 comments
on commit 409c75d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using PlatformIO as IDE developing for platform esp32 on framework arduino.
I included
esp32-hal-log.h
but i still see only log message of type error.
The test code below shows only the log message "Error", no one from the others.
#include <Arduino.h>
#include "esp32-hal-log.h"
void setup() {
Serial.begin(115200);
esp_log_level_set("*", ESP_LOG_VERBOSE);
ESP_LOGE("TAG", "Error");
ESP_LOGW("TAG", "Warning");
ESP_LOGI("TAG", "Info");
ESP_LOGD("TAG", "Debug");
ESP_LOGV("TAG", "Verbose");
}
void loop() {
}
results to:
[E][main.cpp:16] setup(): Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cyberman54 when you compiled your code, what did you set the log level to? Set your logging level to Verbose.
Chuck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using a
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
and a build option
-DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE
Both show no impact, i still get only Logs of type error.
This makes debugging difficult... :-(
Any suggestions how to solve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the Wiki ;) enable log levels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the crucial hint, thank you very much!
Setting
build_flags = -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
solved my problem.
Isn't the
tag
argument discarded, thus?