Espressif Log
Quick note about logging in Espressif SDK.
Include
cpp
#include "esp_log.h"
Macro levels
cpp
static const char *TAG = "MyTag";
ESP_LOGE(TAG, "Error message");
ESP_LOGW(TAG, "Warning message");
ESP_LOGI(TAG, "Info message");
ESP_LOGD(TAG, "Debug message");
ESP_LOGV(TAG, "Verbose message");
Set log level
Set log level per tag:
cpp
esp_log_level_set(TAG, ESP_LOG_INFO);
To set log level for all tags:
cpp
esp_log_level_set("*", ESP_LOG_INFO);