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

Fix log tag comparison when using variable tags (such as non-literals). (IDFGH-897) #2996

Closed

Conversation

DavidAntliff
Copy link
Contributor

Setting a log level by tag does not work when the tag is provided as a variable (rather than a literal string). This is because there is an incorrect equality performed in esp_log_level_set(). A copy of the tag is made but the contents of this copy is not compared - instead the tag pointers are compared, which does not work for non-literal tags.

Refer to this forum post: https://www.esp32.com/viewtopic.php?f=13&t=9004

DavidAntliff added a commit to DavidAntliff/esp32-poolmon that referenced this pull request Jan 28, 2019
@DavidAntliff
Copy link
Contributor Author

Looks like this was fixed on master in 750c8c0 - can we have this fix backported to 3.0.7 please?

@projectgus
Copy link
Contributor

@DavidAntliff Thanks for being patient while someone got back to you.

Our policy is only to backport high severity bugs, to reduce the amount of code churn and reduce the chance of regressions.

Is updating to ESP-IDF v3.1.x a possibility for you?

@github-actions github-actions bot changed the title Fix log tag comparison when using variable tags (such as non-literals). Fix log tag comparison when using variable tags (such as non-literals). (IDFGH-897) Apr 2, 2019
igrr pushed a commit that referenced this pull request Apr 2, 2019
This is a fix for the esp_log_level_set function. The problem is when this
function is called but NOT withe the same 'c' string constant that the LOG*
calls used in each module, the cache check doesn't match, so the cached
entry won't get updated. There's no point in optimizing this function
anyway because it is only called rarely.

Merges #1557

Closes #2996
@DavidAntliff
Copy link
Contributor Author

@projectgus looks like @igrr may have already backported it to v3.0 (thank you) however I'm happy to start trialing v3.1 anyway. Thanks for getting back to me. I think this can be closed now.

@projectgus
Copy link
Contributor

@DavidAntliff It seems like @igrr is more generous than I am. ;).

That's great, I'm happy that this is a good outcome. Thanks again for being patient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants