diff --git a/components/driver/esp32c3/adc.c b/components/driver/esp32c3/adc.c index e4c495d4cf..81b30860c9 100644 --- a/components/driver/esp32c3/adc.c +++ b/components/driver/esp32c3/adc.c @@ -34,9 +34,9 @@ #include "esp_efuse_rtc_calib.h" #include "esp_private/gdma.h" -#define ADC_CHECK_RET(fun_ret) ({ \ +#define ADC_CHECK_RET(fun_ret) ({ \ if (fun_ret != ESP_OK) { \ - ESP_LOGE(ADC_TAG,"%s:%d\n",__FUNCTION__,__LINE__); \ + ESP_LOGE(ADC_TAG,"%s(%d)",__FUNCTION__,__LINE__); \ return ESP_FAIL; \ } \ }) @@ -45,7 +45,7 @@ static const char *ADC_TAG = "ADC"; #define ADC_CHECK(a, str, ret_val) ({ \ if (!(a)) { \ - ESP_LOGE(ADC_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \ + ESP_LOGE(ADC_TAG,"%s(%d) :%s", __FUNCTION__, __LINE__, str); \ return (ret_val); \ } \ }) diff --git a/components/driver/esp32c3/rtc_tempsensor.c b/components/driver/esp32c3/rtc_tempsensor.c index 1ada5f4c0c..189b3418f5 100644 --- a/components/driver/esp32c3/rtc_tempsensor.c +++ b/components/driver/esp32c3/rtc_tempsensor.c @@ -33,7 +33,7 @@ static const char *TAG = "tsens"; #define TSENS_CHECK(res, ret_val) ({ \ if (!(res)) { \ - ESP_LOGE(TAG, "%s:%d (%s)", __FILE__, __LINE__, __FUNCTION__); \ + ESP_LOGE(TAG, "%s(%d)", __FUNCTION__, __LINE__); \ return (ret_val); \ } \ }) diff --git a/components/driver/esp32s2/dac.c b/components/driver/esp32s2/dac.c index bbba688d23..1501a293d5 100644 --- a/components/driver/esp32s2/dac.c +++ b/components/driver/esp32s2/dac.c @@ -29,7 +29,7 @@ static const char *DAC_TAG = "DAC"; #define DAC_CHECK(a, str, ret_val) ({ \ if (!(a)) { \ - ESP_LOGE(DAC_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \ + ESP_LOGE(DAC_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \ return (ret_val); \ } \ }) diff --git a/components/touch_element/include/touch_element/touch_element_private.h b/components/touch_element/include/touch_element/touch_element_private.h index 1d5f837e58..85143157fe 100644 --- a/components/touch_element/include/touch_element/touch_element_private.h +++ b/components/touch_element/include/touch_element/touch_element_private.h @@ -29,7 +29,7 @@ extern "C" { #define TE_CHECK(cond, ret_val) ({ \ if (!(cond)) { \ - ESP_LOGE(TE_TAG, "%s:%d (%s)", __FILE__, __LINE__, __FUNCTION__); \ + ESP_LOGE(TE_TAG, "%s(%d)", __FUNCTION__, __LINE__); \ return (ret_val); \ } \ })