setting CONFIG_LOG_DEFAULT_LEVEL less than INFO does not allow HTTPS connections
Posted: Tue Oct 11, 2022 10:05 pm
I've written ESP32 software that sends post request to an HTTP server using https protocol. Authentication and response succeeds fine-- as long as my Default Log Level (set via menuconfig) is set to INFO or DEBUG (may work for VERBOSE, but Idk). If I set default log level to WARN or ERROR the post negotiation never succeeds--my http handler only ever receives a HTTP_EVENT_DISCONNECTED event (I'm using printf() to print occurrence of any event).
The only difference is the default log level and using the https protocol. However, if I post using unsecured http protocol the request succeeds, regardless of default log level. As indicated below, esp_log_level_set() never seems to work (OK maybe I'm not using it right) even when I place the call in the module handling HTTP events.
Adding call to esp_log_level_set("*", ESP_LOG_INFO) in app_main() when default is set to ERROR still fails.
Adding call to esp_log_level_set("*", ESP_LOG_ERROR) in app_main() when default is set to INFO will result in successful negotiation, however still produces same output as INFO. So it appears that esp_log_level_set() has no effect.
As it stands now, I can only get https post requests to work if I set default log level to ERROR and INFO (probably VERBOSE too).
Please help me understand how I can fix this, the logging will probably affect my performance.
The source is too extensive to post to this forum.
Thanks
testing with a ESP32-DevKitC
ESP-IDF v4.4.1-dirty
ubuntu 20.04
The only difference is the default log level and using the https protocol. However, if I post using unsecured http protocol the request succeeds, regardless of default log level. As indicated below, esp_log_level_set() never seems to work (OK maybe I'm not using it right) even when I place the call in the module handling HTTP events.
Adding call to esp_log_level_set("*", ESP_LOG_INFO) in app_main() when default is set to ERROR still fails.
Adding call to esp_log_level_set("*", ESP_LOG_ERROR) in app_main() when default is set to INFO will result in successful negotiation, however still produces same output as INFO. So it appears that esp_log_level_set() has no effect.
As it stands now, I can only get https post requests to work if I set default log level to ERROR and INFO (probably VERBOSE too).
Please help me understand how I can fix this, the logging will probably affect my performance.
The source is too extensive to post to this forum.
Thanks
testing with a ESP32-DevKitC
ESP-IDF v4.4.1-dirty
ubuntu 20.04