From 6a42266795fb8d2fa32d073b2a99708ec40995de Mon Sep 17 00:00:00 2001 From: Andrii Date: Thu, 10 Aug 2023 10:58:44 +0200 Subject: [PATCH] fix(mqtt): Unite supported components tags under common structure --- examples/protocols/mqtt/ssl/main/app_main.c | 12 ++++++------ examples/protocols/mqtt/ssl_ds/main/app_main.c | 10 +++++----- .../protocols/mqtt/ssl_mutual_auth/main/app_main.c | 10 +++++----- examples/protocols/mqtt/ssl_psk/main/app_main.c | 10 +++++----- examples/protocols/mqtt/tcp/main/app_main.c | 8 ++++---- examples/protocols/mqtt/ws/main/app_main.c | 14 +++++++------- examples/protocols/mqtt/wss/main/app_main.c | 12 ++++++------ examples/protocols/mqtt5/main/app_main.c | 12 ++++++------ .../sockets/icmpv6_ping/main/icmpv6_ping.c | 2 +- .../protocols/mqtt/build_test/main/mqtt_app.cpp | 14 +++++++------- .../mqtt/publish_connect_test/main/connect_test.c | 2 +- .../main/publish_connect_test.c | 10 +++++----- .../mqtt/publish_connect_test/main/publish_test.c | 2 +- 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/examples/protocols/mqtt/ssl/main/app_main.c b/examples/protocols/mqtt/ssl/main/app_main.c index 570bdd3fec..20cf1808f4 100644 --- a/examples/protocols/mqtt/ssl/main/app_main.c +++ b/examples/protocols/mqtt/ssl/main/app_main.c @@ -24,7 +24,7 @@ #include "esp_ota_ops.h" #include -static const char *TAG = "MQTTS_EXAMPLE"; +static const char *TAG = "mqtts_example"; #if CONFIG_BROKER_CERTIFICATE_OVERRIDDEN == 1 @@ -145,11 +145,11 @@ void app_main(void) esp_log_level_set("*", ESP_LOG_INFO); esp_log_level_set("esp-tls", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt/ssl_ds/main/app_main.c b/examples/protocols/mqtt/ssl_ds/main/app_main.c index 160392a4e4..758995b8b8 100644 --- a/examples/protocols/mqtt/ssl_ds/main/app_main.c +++ b/examples/protocols/mqtt/ssl_ds/main/app_main.c @@ -30,7 +30,7 @@ #include "rsa_sign_alt.h" #include "esp_secure_cert_read.h" -static const char *TAG = "MQTTS_EXAMPLE"; +static const char *TAG = "mqtts_example"; extern const uint8_t server_cert_pem_start[] asm("_binary_mosquitto_org_crt_start"); extern const uint8_t server_cert_pem_end[] asm("_binary_mosquitto_org_crt_end"); @@ -137,10 +137,10 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c b/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c index 9798cb9b49..02956f603f 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c +++ b/examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c @@ -29,7 +29,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTTS_EXAMPLE"; +static const char *TAG = "mqtts_example"; extern const uint8_t client_cert_pem_start[] asm("_binary_client_crt_start"); extern const uint8_t client_cert_pem_end[] asm("_binary_client_crt_end"); @@ -136,10 +136,10 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt/ssl_psk/main/app_main.c b/examples/protocols/mqtt/ssl_psk/main/app_main.c index 67df8639b2..4d2bb10594 100644 --- a/examples/protocols/mqtt/ssl_psk/main/app_main.c +++ b/examples/protocols/mqtt/ssl_psk/main/app_main.c @@ -36,7 +36,7 @@ */ #define EXAMPLE_BROKER_URI "mqtts://192.168.0.2" -static const char *TAG = "MQTTS_EXAMPLE"; +static const char *TAG = "mqtts_example"; /* * Define psk key and hint as defined in mqtt broker @@ -131,11 +131,11 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); esp_log_level_set("esp-tls", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt/tcp/main/app_main.c b/examples/protocols/mqtt/tcp/main/app_main.c index 06ff1ad43e..6fe652b5b7 100644 --- a/examples/protocols/mqtt/tcp/main/app_main.c +++ b/examples/protocols/mqtt/tcp/main/app_main.c @@ -30,7 +30,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTT_EXAMPLE"; +static const char *TAG = "mqtt_example"; static void log_error_if_nonzero(const char *message, int error_code) @@ -151,10 +151,10 @@ void app_main(void) esp_log_level_set("*", ESP_LOG_INFO); esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); esp_log_level_set("esp-tls", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); diff --git a/examples/protocols/mqtt/ws/main/app_main.c b/examples/protocols/mqtt/ws/main/app_main.c index 59f09cf4e0..cebfb9ae37 100644 --- a/examples/protocols/mqtt/ws/main/app_main.c +++ b/examples/protocols/mqtt/ws/main/app_main.c @@ -29,7 +29,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTTWS_EXAMPLE"; +static const char *TAG = "mqttws_example"; static void log_error_if_nonzero(const char *message, int error_code) { @@ -123,12 +123,12 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_WS", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport_ws", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt/wss/main/app_main.c b/examples/protocols/mqtt/wss/main/app_main.c index f91305180e..168b46a8cf 100644 --- a/examples/protocols/mqtt/wss/main/app_main.c +++ b/examples/protocols/mqtt/wss/main/app_main.c @@ -29,7 +29,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTTWSS_EXAMPLE"; +static const char *TAG = "mqttwss_example"; #if CONFIG_BROKER_CERTIFICATE_OVERRIDDEN == 1 @@ -115,11 +115,11 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/mqtt5/main/app_main.c b/examples/protocols/mqtt5/main/app_main.c index 461ca4c2d7..746017c53a 100644 --- a/examples/protocols/mqtt5/main/app_main.c +++ b/examples/protocols/mqtt5/main/app_main.c @@ -16,7 +16,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTT5_EXAMPLE"; +static const char *TAG = "mqtt5_example"; static void log_error_if_nonzero(const char *message, int error_code) { @@ -269,12 +269,12 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); esp_log_level_set("esp-tls", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/examples/protocols/sockets/icmpv6_ping/main/icmpv6_ping.c b/examples/protocols/sockets/icmpv6_ping/main/icmpv6_ping.c index 1af387c3ad..d9db5f16ac 100644 --- a/examples/protocols/sockets/icmpv6_ping/main/icmpv6_ping.c +++ b/examples/protocols/sockets/icmpv6_ping/main/icmpv6_ping.c @@ -19,7 +19,7 @@ #define MSG_BUFF_SIZE (256) -static const char *TAG = "ICMPv6_PING"; +static const char *TAG = "icmpv6_ping"; /* types of ipv6 addresses to be displayed on ipv6 events */ static const char *s_ipv6_addr_types[] = { diff --git a/tools/test_apps/protocols/mqtt/build_test/main/mqtt_app.cpp b/tools/test_apps/protocols/mqtt/build_test/main/mqtt_app.cpp index 4a3f8a592c..2960f41d5a 100644 --- a/tools/test_apps/protocols/mqtt/build_test/main/mqtt_app.cpp +++ b/tools/test_apps/protocols/mqtt/build_test/main/mqtt_app.cpp @@ -15,7 +15,7 @@ #include "esp_log.h" #include "mqtt_client.h" -static const char *TAG = "MQTT_EXAMPLE"; +static const char *TAG = "mqtt_example"; static esp_err_t mqtt_event_handler_cb(esp_mqtt_event_handle_t event) @@ -86,12 +86,12 @@ extern "C" void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("MQTT_EXAMPLE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_TCP", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_SSL", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_example", ESP_LOG_VERBOSE); + esp_log_level_set("transport_tcp", ESP_LOG_VERBOSE); + esp_log_level_set("transport_ssl", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/tools/test_apps/protocols/mqtt/publish_connect_test/main/connect_test.c b/tools/test_apps/protocols/mqtt/publish_connect_test/main/connect_test.c index be07e5a0a4..e8132efa31 100644 --- a/tools/test_apps/protocols/mqtt/publish_connect_test/main/connect_test.c +++ b/tools/test_apps/protocols/mqtt/publish_connect_test/main/connect_test.c @@ -33,7 +33,7 @@ extern const uint8_t client_pwd_key[] asm("_binary_client_pwd_key_start"); extern const uint8_t client_inv_crt[] asm("_binary_client_inv_crt_start"); extern const uint8_t client_no_pwd_key[] asm("_binary_client_no_pwd_key_start"); -static const char *TAG = "CONNECT_TEST"; +static const char *TAG = "connect_test"; static esp_mqtt_client_handle_t mqtt_client = NULL; static int running_test_case = 0; diff --git a/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_connect_test.c b/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_connect_test.c index 84da251963..b793215f73 100644 --- a/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_connect_test.c +++ b/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_connect_test.c @@ -16,7 +16,7 @@ #include "protocol_examples_common.h" #include "esp_log.h" -static const char *TAG = "PUBLISH_CONNECT_TEST"; +static const char *TAG = "publish_connect_test"; void connection_test(const char *line); void publish_test(const char *line); @@ -45,10 +45,10 @@ void app_main(void) ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); esp_log_level_set("*", ESP_LOG_INFO); - esp_log_level_set("MQTT_CLIENT", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT_BASE", ESP_LOG_VERBOSE); - esp_log_level_set("TRANSPORT", ESP_LOG_VERBOSE); - esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE); + esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE); + esp_log_level_set("transport_base", ESP_LOG_VERBOSE); + esp_log_level_set("transport", ESP_LOG_VERBOSE); + esp_log_level_set("outbox", ESP_LOG_VERBOSE); ESP_ERROR_CHECK(nvs_flash_init()); ESP_ERROR_CHECK(esp_netif_init()); diff --git a/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_test.c b/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_test.c index 8b74f4e0a5..d9ddf08e75 100644 --- a/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_test.c +++ b/tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_test.c @@ -19,7 +19,7 @@ #include "mqtt_client.h" #include "sdkconfig.h" -static const char *TAG = "PUBLISH_TEST"; +static const char *TAG = "publish_test"; static EventGroupHandle_t mqtt_event_group; const static int CONNECTED_BIT = BIT0;