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

simonjo
Posts: 21
Joined: Wed Sep 30, 2020 9:16 am

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

Postby simonjo » Sat May 22, 2021 4:20 pm

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

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

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

Postby WiFive » Sat May 22, 2021 7:15 pm

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

simonjo
Posts: 21
Joined: Wed Sep 30, 2020 9:16 am

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

Postby simonjo » Sat May 22, 2021 10:07 pm

Ok that explains it, compiled with LEVEL_VERBOSE and turned down obsolete loggings

thx

joy586210
Posts: 5
Joined: Tue Sep 26, 2023 5:25 am

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

Postby joy586210 » Tue Sep 26, 2023 2:46 pm

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.

Who is online

Users browsing this forum: No registered users and 50 guests