forked from espressif/arduino-esp32
Implement ESP_LOGx override option
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
This commit is contained in:
@ -107,6 +107,22 @@ int log_printf(const char *fmt, ...);
|
||||
#define log_e(format, ...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARDUHAL_ESP_LOG
|
||||
#include "esp_log.h"
|
||||
|
||||
#undef ESP_LOGE
|
||||
#undef ESP_LOGW
|
||||
#undef ESP_LOGI
|
||||
#undef ESP_LOGD
|
||||
#undef ESP_LOGV
|
||||
|
||||
#define ESP_LOGE(tag, ...) log_e(__VA_ARGS__)
|
||||
#define ESP_LOGW(tag, ...) log_w(__VA_ARGS__)
|
||||
#define ESP_LOGI(tag, ...) log_i(__VA_ARGS__)
|
||||
#define ESP_LOGD(tag, ...) log_d(__VA_ARGS__)
|
||||
#define ESP_LOGV(tag, ...) log_v(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user