From a20d9287fe22b7b635886a766c7347b6f68dec0a Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 15 Oct 2018 14:59:46 +0800 Subject: [PATCH] soc: use _EARLY versions of ESP_LOG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some logging done in soc component may happen before logging via stdout is possible. Use _EARLY version of log calls to make sure that output is visible. The downside is that application does not have a way to silence these logs. However since the soc component doesn’t use any LOGV/LOGD/LOGI and only logs warnings and errors, this should not impact the application. --- components/soc/esp32/soc_log.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/soc/esp32/soc_log.h b/components/soc/esp32/soc_log.h index 14ba19344c..4fdffd7b50 100644 --- a/components/soc/esp32/soc_log.h +++ b/components/soc/esp32/soc_log.h @@ -24,11 +24,11 @@ #ifdef ESP_PLATFORM #include "esp_log.h" -#define SOC_LOGE(tag, fmt, ...) ESP_LOGE(tag, fmt, ##__VA_ARGS__) -#define SOC_LOGW(tag, fmt, ...) ESP_LOGW(tag, fmt, ##__VA_ARGS__) -#define SOC_LOGI(tag, fmt, ...) ESP_LOGI(tag, fmt, ##__VA_ARGS__) -#define SOC_LOGD(tag, fmt, ...) ESP_LOGD(tag, fmt, ##__VA_ARGS__) -#define SOC_LOGV(tag, fmt, ...) ESP_LOGV(tag, fmt, ##__VA_ARGS__) +#define SOC_LOGE(tag, fmt, ...) ESP_EARLY_LOGE(tag, fmt, ##__VA_ARGS__) +#define SOC_LOGW(tag, fmt, ...) ESP_EARLY_LOGW(tag, fmt, ##__VA_ARGS__) +#define SOC_LOGI(tag, fmt, ...) ESP_EARLY_LOGI(tag, fmt, ##__VA_ARGS__) +#define SOC_LOGD(tag, fmt, ...) ESP_EARLY_LOGD(tag, fmt, ##__VA_ARGS__) +#define SOC_LOGV(tag, fmt, ...) ESP_EARLY_LOGV(tag, fmt, ##__VA_ARGS__) #else #include "rom/ets_sys.h"