diff --git a/include/zh_syslog.h b/include/zh_syslog.h index 1478f95..41a586d 100644 --- a/include/zh_syslog.h +++ b/include/zh_syslog.h @@ -123,7 +123,7 @@ extern "C" * @return ESP_FAIL if socket creation fails * * @note Connection to the network must be established before calling this function. - * @note Before initialize the syslog client recommend initialize zh_syslog_init_config_t structure with default values. + * @note Before initializing the syslog client, it is recommended to initialize the zh_syslog_init_config_t structure with default values. */ esp_err_t zh_syslog_init(const zh_syslog_init_config_t *config); diff --git a/zh_syslog.c b/zh_syslog.c index 11281f0..d7cd4c1 100644 --- a/zh_syslog.c +++ b/zh_syslog.c @@ -53,7 +53,7 @@ esp_err_t zh_syslog_send(const zh_syslog_facility_code_t facility, const zh_sysl ZH_ERROR_CHECK(payload != NULL, ESP_ERR_NO_MEM, NULL, "Syslog client send fail. Memory allocation fail or no free memory in the heap."); sprintf(payload, "<%d>1 - %s %s - - - %s", ((uint8_t)facility * 8) + (uint8_t)severity, hostname, app_name, message); int temp = sendto(_socket, payload, strlen(payload), 0, (struct sockaddr *)&_syslog_server, sizeof(_syslog_server)); // -V641 - ZH_ERROR_CHECK(temp >= 0, ESP_FAIL, heap_caps_free(payload), "Syslog client send fail. Socker error."); + ZH_ERROR_CHECK(temp >= 0, ESP_FAIL, heap_caps_free(payload), "Syslog client send fail. Socket error."); heap_caps_free(payload); ESP_LOGI(TAG, "Syslog client send success."); return ESP_OK;