Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
MQTT log backend API . More...
Functions | |
int | log_backend_mqtt_client_set (struct mqtt_client *client) |
Set the MQTT client instance to be able to publish application's log messages to broker. | |
int | log_backend_mqtt_topic_set (const char *topic) |
Set the MQTT topic to which log messages will be published. | |
MQTT log backend API .
int log_backend_mqtt_client_set | ( | struct mqtt_client * | client | ) |
#include <zephyr/logging/log_backend_mqtt.h>
Set the MQTT client instance to be able to publish application's log messages to broker.
This function allows the application to provide its own initialized MQTT client to the log backend. The backend will use this client exclusively for publishing log messages via mqtt_publish().
client | Pointer to an initialized and connected MQTT client. The client must remain valid for the lifetime of the log backend usage. Pass NULL to disable MQTT logging. |
int log_backend_mqtt_topic_set | ( | const char * | topic | ) |
#include <zephyr/logging/log_backend_mqtt.h>
Set the MQTT topic to which log messages will be published.
Allows the application to specify the MQTT topic that the log backend will use for publishing log messages to.
topic | Pointer to a null-terminated string containing the MQTT topic. The topic must remain valid for the lifetime of the log backend usage. |