esp-idf 5.1 crazy amount of log output... way different than before

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

esp-idf 5.1 crazy amount of log output... way different than before

Postby PeteDD » Sat Dec 02, 2023 10:18 pm

ESP-IDF 5.1 is putting out way more information on the serial port than prior releases did.
Any log setting above

Code: Select all

CONFIG_LOG_DEFAULT_LEVEL=0
produces a bunch of serial output like the following what I show below... In fact, NONE of these messages shown actually come from any of the ESP_LOG statements in my code.

This is very different than what I got with similar settings before esp-idf 5.1.
Are there other settings in sdkconfig (menuconfig) that I need to look at to get back to ONLY the output of the ESP_LOG statements that I put in my code? Or will I just have to go into each library and see what they are logging there? This really has destroyed the usefulness of ESP_LOG for me. I use it extensively in my code and now the output has a ton of additional messaging that totally buggers up my apps. Sigh.

Code: Select all

D (1968) nvs: nvs_open_from_partition phy 0␛[0m
D (1972) nvs: nvs_get cal_version 4␛[0m
D (1976) nvs: nvs_get_str_or_blob cal_mac␛[0m
D (1981) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit␛[0m
D (1987) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit␛[0m
D (1994) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit␛[0m
D (2001) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit␛[0m
D (2008) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit␛[0m
D (2015) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit␛[0m
D (2022) nvs: nvs_get_str_or_blob cal_data␛[0m
D (2033) nvs: nvs_close 7␛[0m
D (2034) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit␛[0m
D (2036) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit␛[0m
D (2043) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit␛[0m
D (2050) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit␛[0m
D (2057) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit␛[0m
D (2064) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit␛[0m
D (2074) temperature_sensor: range changed, change to index 2␛[0m
D (2088) wifi:filter: set rx policy=0
I (2088) wifi:mode : sta (34:85:18:96:f0:a0)
I (2089) wifi:enable tsf
D (2089) wifi:filter: set rx policy=1

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: esp-idf 5.1 crazy amount of log output... way different than before

Postby mikemoy » Sun Dec 03, 2023 12:24 am

You can do something like this to minimize it. use ESP_LOG_NONE to disable all logging. Then turn on what you do want to log.


#define MAIN_TAG "Main"

void app_main(void)
{
esp_log_level_set("*", ESP_LOG_NONE);
esp_log_level_set(MAIN_TAG, ESP_LOG_VERBOSE);

PeteDD
Posts: 45
Joined: Sat Sep 24, 2022 5:22 pm

Re: esp-idf 5.1 crazy amount of log output... way different than before

Postby PeteDD » Thu Dec 07, 2023 10:43 pm

Thanks. I ended up doing something like that and adding my own "MY_LOG_LEVEL" and then setting in my settings.h file

Code: Select all

#define MY_LOG_LEVEL ESP_LOG_DEBUG
then, in each of my functions, something like this...

Code: Select all

    static const char *TAG = "wifiInit";
    esp_log_level_set(TAG, MY_LOG_LEVEL);
Now I can control the output to be the logging of my functions and if I want to see all that "crazy" logging of all the library and system functions, I can still remover the

Code: Select all

esp_log_level_set("*", ESP_LOG_NONE);
from setup() and set the following in my settings.h, for example

Code: Select all

#define LOG_LOCAL_LEVEL ESP_LOG_DEBUG
best of both worlds... just now have to apply this to all my projects that I want to move forward on the ESP_IDF 5.1

Thanks again.

Who is online

Users browsing this forum: No registered users and 94 guests