You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to limit the amount of information that is logged via both Serial Console and Web Console to allow debugging some long term issues in specific components / modules of the code.
Currently I am drowning in the messages send via Hoymiles.cpp and HoymilesRadio.cpp on Commands being sent and Packets being handled. At least the latter I would like to mute as I am trying to focus on other modules / components of the OpenDTU, e.g. lost WiFi connection, etc.
IMO it would make sense to use a logging framework, e.g. ESP-IDF which allows for several Log Levels (Error, Warning, Info, Debug, Verbose) as well as allows tagging individual modules (e.g. Hoymiles, HoymilesRadio, etc.)
To configure logging output per module at runtime, add calls to the function esp_log_level_set() as follows:
esp_log_level_set("*", ESP_LOG_ERROR); // set all components to ERROR levelesp_log_level_set("wifi", ESP_LOG_WARN); // enable WARN logs from WiFi stackesp_log_level_set("dhcpc", ESP_LOG_INFO); // enable INFO logs from DHCP client
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to limit the amount of information that is logged via both Serial Console and Web Console to allow debugging some long term issues in specific components / modules of the code.
Currently I am drowning in the messages send via Hoymiles.cpp and HoymilesRadio.cpp on Commands being sent and Packets being handled. At least the latter I would like to mute as I am trying to focus on other modules / components of the OpenDTU, e.g. lost WiFi connection, etc.
IMO it would make sense to use a logging framework, e.g. ESP-IDF which allows for several Log Levels (Error, Warning, Info, Debug, Verbose) as well as allows tagging individual modules (e.g. Hoymiles, HoymilesRadio, etc.)
Logging library
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/log.html
...
Beta Was this translation helpful? Give feedback.
All reactions