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

[TW#19280] Setting esp level log doesn't work #1713

Closed
jstar88 opened this issue Mar 13, 2018 · 2 comments
Closed

[TW#19280] Setting esp level log doesn't work #1713

jstar88 opened this issue Mar 13, 2018 · 2 comments

Comments

@jstar88
Copy link

jstar88 commented Mar 13, 2018

I'm using last version of esp idf.
Seems like esp_log_level_set() doesn't override the log level in menuconfig

esp_log_level_set("*", ESP_LOG_VERBOSE);
ESP_LOGV(TAG_I2C, "OK _sendStopBit"); // don't work
ESP_LOGD(TAG_I2C, "OK _sendStopBit"); // work
/**
 * @brief Set log level for given tag
 *
 * If logging for given component has already been enabled, changes previous setting.
 *
 * @param tag Tag of the log entries to enable. Must be a non-NULL zero terminated string.
 *            Value "*" resets log level for all tags to the given value.
 *
 * @param level  Selects log level to enable. Only logs at this and lower levels will be shown.
 */
void esp_log_level_set(const char* tag, esp_log_level_t level);`
@agmuntianu
Copy link

I had a similar situation, and I noticed that changing the menuconfig log level will actually result in different compiled code size, so I guess esp_log_level_set only applies to log levels higher than the on in menuconfig.

@jstar88
Copy link
Author

jstar88 commented Mar 15, 2018

Thank you, this behavior must be better explained in the function documentation

@FayeY FayeY changed the title Setting esp level log doesn't work [TW#19280] Setting esp level log doesn't work Mar 19, 2018
@igrr igrr closed this as completed in 12f7079 May 18, 2018
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

No branches or pull requests

2 participants