Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp_log_level_set("*", ESP_LOG_INFO) doesn't work (IDFGH-333) #2285

Closed
v1993 opened this issue Aug 11, 2018 · 2 comments
Closed

esp_log_level_set("*", ESP_LOG_INFO) doesn't work (IDFGH-333) #2285

v1993 opened this issue Aug 11, 2018 · 2 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@v1993
Copy link
Contributor

v1993 commented Aug 11, 2018

Environment

  • IDF version (git rev-parse --short HEAD to get the commit id.): 30545f4
  • Development Env: Make
  • Operating System: Ubuntu
  • Power Supply: USB

Problem Description

After executing esp_log_level_set("*", ESP_LOG_INFO); debug messages from esp_timer module is still here.

Expected Behavior

  1. Set Default log vebosity to debug.
  2. Run esp_log_level_set("*", ESP_LOG_INFO);.
  3. No more debug messages from modules.

Actual Behavior

  1. Set Default log vebosity to debug.
  2. Run esp_log_level_set("*", ESP_LOG_INFO);.
  3. Still getting debug messages from modules.

Steps to repropduce

Listed above

@FayeY FayeY changed the title esp_log_level_set("*", ESP_LOG_INFO) doesn't work [TW#25617] esp_log_level_set("*", ESP_LOG_INFO) doesn't work Aug 20, 2018
@projectgus projectgus changed the title [TW#25617] esp_log_level_set("*", ESP_LOG_INFO) doesn't work esp_log_level_set("*", ESP_LOG_INFO) doesn't work (IDFGH-333) Mar 12, 2019
@v1993
Copy link
Contributor Author

v1993 commented May 4, 2019

Are there any news aboun this?

@projectgus
Copy link
Contributor

Hi @v1993,

Sorry for the unacceptably long time it's taken someone to reply to you about this, and thanks for being patient.

The root cause for this is that some log lines have to be ISR-safe as they may be called with interrupts disabled, which means they use ESP_EARLY_LOGx macros instead of ESP_LOGx. Until now these macros aren't subject to any runtime filtering - if they're compiled in at the default log level then they're always going to log. The only current workaround is to define the LOG_LOCAL_LEVEL macro in the corresponding source files to change their compile-time log level.

We have a change in review that fixes this. It's still not possible to do tag-specific filtering on "early" log macros, but setting the default level with * will enable/disable them.

This issue will be updated when that fix is available (should be soon).

@espressif-bot espressif-bot added the Status: In Progress Work is in progress label Apr 19, 2021
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants