Wrong logging level for ESP_LOGI [IDFGH-5232]

dkatsig
Posts: 1
Joined: Mon Jan 27, 2020 12:49 pm

Wrong logging level for ESP_LOGI [IDFGH-5232]

Postby dkatsig » Sun May 09, 2021 12:28 pm

Well, it's really minor but I think that ESP_LOGI actually logs with error level

In esp_idf 4.2 (esp_log.h, line 49)
  1. #define ESP_LOGI( tag, format, ... )  if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO)    { esp_log_write(ESP_LOG_INFO,    tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
should be
  1. #define ESP_LOGI( tag, format, ... )  if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO)    { esp_log_write(ESP_LOG_INFO,    tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
I am in commit c40f2590bf759ff60ef122afa79b4ec04e7633d2 (HEAD -> v4.2, tag: v4.2) of esp_idf

ESP_Alvin
Posts: 211
Joined: Thu May 17, 2018 2:26 am

Re: Wrong logging level for ESP_LOGI [IDFGH-5232]

Postby ESP_Alvin » Mon May 10, 2021 2:29 am

Moderator's note: edit the topic title for issue tracking, thanks for reporting.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Wrong logging level for ESP_LOGI [IDFGH-5232]

Postby ESP_Angus » Mon May 10, 2021 11:49 pm

Hi dkatsig,

Thanks for noticing this! We run some of our ESP-IDF automated tests on the host system, and to do this we have to stub out some of the lower-level functions like logging, flash, etc.

The stub header for logging in spi_flash host testing does indeed have this typo and logs at the wrong level, we'll fix this.

The header used in the esp-idf log component for on-device firmware logs at the correct level.

Thanks again for pointing this out.

Who is online

Users browsing this forum: No registered users and 40 guests