mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
driver, http_client, web_socket, tcp_transport: remove __FILE__ from log messages
__FILE__ macro in the error messages adds full paths to the production binarys, remove __FILE__ from the ESP_LOGE. Closes https://github.com/espressif/esp-idf/issues/5637 Merges https://github.com/espressif/esp-idf/pull/5638
This commit is contained in:
@@ -44,7 +44,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); \
|
||||
} \
|
||||
})
|
||||
|
@@ -30,7 +30,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); \
|
||||
} \
|
||||
})
|
||||
|
@@ -57,7 +57,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); \
|
||||
} \
|
||||
})
|
||||
|
@@ -59,7 +59,7 @@ static SemaphoreHandle_t rtc_touch_mux = NULL;
|
||||
static const char *TOUCH_TAG = "TOUCH_SENSOR";
|
||||
#define TOUCH_CHECK(a, str, ret_val) ({ \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(TOUCH_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(TOUCH_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
} \
|
||||
})
|
||||
|
@@ -43,7 +43,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); \
|
||||
} \
|
||||
})
|
||||
|
@@ -29,7 +29,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); \
|
||||
} \
|
||||
})
|
||||
|
@@ -45,7 +45,7 @@
|
||||
static const char *TOUCH_TAG = "TOUCH_SENSOR";
|
||||
#define TOUCH_CHECK(a, str, ret_val) ({ \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(TOUCH_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(TOUCH_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
} \
|
||||
})
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
static const char *I2C_TAG = "i2c";
|
||||
#define I2C_CHECK(a, str, ret) if(!(a)) { \
|
||||
ESP_LOGE(I2C_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(I2C_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret); \
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
static const char* I2S_TAG = "I2S";
|
||||
|
||||
#define I2S_CHECK(a, str, ret) if (!(a)) { \
|
||||
ESP_LOGE(I2S_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(I2S_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret); \
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ typedef struct {
|
||||
static const char *MCPWM_TAG = "MCPWM";
|
||||
|
||||
#define MCPWM_CHECK(a, str, ret_val) if (!(a)) { \
|
||||
ESP_LOGE(MCPWM_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(MCPWM_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ static const char *RTCIO_TAG = "RTCIO";
|
||||
|
||||
#define RTCIO_CHECK(a, str, ret_val) ({ \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(RTCIO_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(RTCIO_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
} \
|
||||
})
|
||||
|
@@ -107,7 +107,7 @@ The driver of FIFOs works as below:
|
||||
|
||||
static const char TAG[] = "sdio_slave";
|
||||
|
||||
#define SDIO_SLAVE_LOGE(s, ...) ESP_LOGE(TAG, "%s:%d (%s):"s, __FILE__,__LINE__,__FUNCTION__,##__VA_ARGS__)
|
||||
#define SDIO_SLAVE_LOGE(s, ...) ESP_LOGE(TAG, "%s(%d): "s, __FUNCTION__,__LINE__,##__VA_ARGS__)
|
||||
#define SDIO_SLAVE_LOGW(s, ...) ESP_LOGW(TAG, "%s: "s, __FUNCTION__,##__VA_ARGS__)
|
||||
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
static const char *TAG = "SIGMADELTA";
|
||||
|
||||
#define SIGMADELTA_CHECK(a,str,ret_val) if(!(a)) { \
|
||||
ESP_LOGE(TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
static const char *TOUCH_TAG = "TOUCH_SENSOR";
|
||||
#define TOUCH_CHECK(a, str, ret_val) ({ \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(TOUCH_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
ESP_LOGE(TOUCH_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
} \
|
||||
})
|
||||
|
@@ -81,7 +81,7 @@ int http_utils_str_starts_with(const char *str, const char *start);
|
||||
|
||||
|
||||
#define HTTP_MEM_CHECK(TAG, a, action) if (!(a)) { \
|
||||
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
|
||||
ESP_LOGE(TAG,"%s(%d): %s", __FUNCTION__, __LINE__, "Memory exhausted"); \
|
||||
action; \
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ static const char *TAG = "WEBSOCKET_CLIENT";
|
||||
#define WEBSOCKET_PINGPONG_TIMEOUT_SEC (120)
|
||||
|
||||
#define ESP_WS_CLIENT_MEM_CHECK(TAG, a, action) if (!(a)) { \
|
||||
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
|
||||
ESP_LOGE(TAG,"%s(%d): %s", __FUNCTION__, __LINE__, "Memory exhausted"); \
|
||||
action; \
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
#define ESP_TRANSPORT_MEM_CHECK(TAG, a, action) if (!(a)) { \
|
||||
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
|
||||
ESP_LOGE(TAG,"%s(%d): %s", __FUNCTION__, __LINE__, "Memory exhausted"); \
|
||||
action; \
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user