Page 1 of 1

esp_log_level_set("wl_flash", ESP_LOG_VERBOSE); does not work

Posted: Sat May 22, 2021 4:20 pm
by simonjo
Hi,

Due to periodic corruption of my FATFS with Wear Leveling , I want to turn on some debug logging in the console.

Therefor I added esp_log_level_set("wl_flash", ESP_LOG_VERBOSE); as first statement in my code, but there is no debug output.

Even though my application writes to a logfile every minute.

Only after modifying sdkconfig to CONFIG_LOG_DEFAULT_LEVEL_VERBOSE does wl_flash debug appear, but not only wl_flash. Now a lot of other (unneeded) logging comes out.

Is this a bug or am I doing something wrong when using esp_log_level_set() ???



Thx, Jo

Re: esp_log_level_set("wl_flash", ESP_LOG_VERBOSE); does not work

Posted: Sat May 22, 2021 7:15 pm
by WiFive
That's how it works. You have to set the default log level using wildcard then adjust individual levels.

https://github.com/espressif/esp-idf/bl ... pp#L88-L94

https://github.com/espressif/esp-idf/bl ... ig#L11-L15

There is also a new feature

https://github.com/espressif/esp-idf/bl ... config#L40

Re: esp_log_level_set("wl_flash", ESP_LOG_VERBOSE); does not work

Posted: Sat May 22, 2021 10:07 pm
by simonjo
Ok that explains it, compiled with LEVEL_VERBOSE and turned down obsolete loggings

thx

Re: esp_log_level_set("wl_flash", ESP_LOG_VERBOSE); does not work

Posted: Tue Sep 26, 2023 2:46 pm
by joy586210
as explained here:
https://docs.espressif.com/projects/esp ... og_level_t
Note that this function can not raise log level above the level set using CONFIG_LOG_MAXIMUM_LEVEL setting in menuconfig.