|
This header defines the types and functions your application uses to be notified of Azure SDK client library log messages. More...
#include <azure/core/az_result.h>
#include <azure/core/az_span.h>
#include <stdint.h>
#include <azure/core/_az_cfg_prefix.h>
#include <azure/core/_az_cfg_suffix.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | az_log_message_fn) (az_log_classification classification, az_span message) |
Defines the signature of the callback function that application developers must write in order to receive Azure SDK log messages. More... | |
Enumerations | |
enum | az_log_classification { AZ_LOG_END_OF_LIST = -1, AZ_LOG_HTTP_REQUEST = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_HTTP, 1), AZ_LOG_HTTP_RESPONSE = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_HTTP, 2), AZ_LOG_HTTP_RETRY, AZ_LOG_MQTT_RECEIVED_TOPIC = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_MQTT, 1), AZ_LOG_MQTT_RECEIVED_PAYLOAD = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_MQTT, 2), AZ_LOG_IOT_RETRY = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_IOT, 1), AZ_LOG_IOT_SAS_TOKEN = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_IOT, 2), AZ_LOG_IOT_AZURERTOS = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_IOT, 3) } |
Identifies the classifications of log messages produced by the SDK. More... | |
Functions | |
void | az_log_set_classifications (az_log_classification const classifications[]) |
Allows the application to specify which az_log_classification types it is interested in receiving. More... | |
void | az_log_set_callback (az_log_message_fn az_log_message_callback) |
Sets the function that will be invoked to report an SDK log message. More... | |
This header defines the types and functions your application uses to be notified of Azure SDK client library log messages.
If you define the AZ_NO_LOGGING
symbol when compiling the SDK code (or adding option -DLOGGING=OFF
with cmake), all of the Azure SDK logging functionality will be excluded, making the resulting compiled code smaller and faster.
typedef void(* az_log_message_fn) (az_log_classification classification, az_span message) |
Defines the signature of the callback function that application developers must write in order to receive Azure SDK log messages.
[in] | classification | The log message's az_log_classification. |
[in] | message | The log message. |
Identifies the classifications of log messages produced by the SDK.
Enumerator | |
---|---|
AZ_LOG_END_OF_LIST | Terminates the classification array passed to az_log_set_classifications(). |
AZ_LOG_HTTP_REQUEST | HTTP request is about to be sent. |
AZ_LOG_HTTP_RESPONSE | HTTP response was received. |
AZ_LOG_HTTP_RETRY | First HTTP request did not succeed and will be retried. |
AZ_LOG_MQTT_RECEIVED_TOPIC | Accepted MQTT topic received. |
AZ_LOG_MQTT_RECEIVED_PAYLOAD | Accepted MQTT payload received. |
AZ_LOG_IOT_RETRY | IoT Client retry. |
AZ_LOG_IOT_SAS_TOKEN | IoT Client generated new SAS token. |
AZ_LOG_IOT_AZURERTOS | Azure IoT classification for Azure RTOS. |
void az_log_set_callback | ( | az_log_message_fn | az_log_message_callback | ) |
Sets the function that will be invoked to report an SDK log message.
[in] | az_log_message_callback | [nullable] A pointer to the function that will be invoked when the SDK reports a log message matching one of the az_log_classification passed to az_log_set_classifications(). If NULL , no function will be invoked. |
void az_log_set_classifications | ( | az_log_classification const | classifications[] | ) |
Allows the application to specify which az_log_classification types it is interested in receiving.
If no classifications are set (NULL
), the application will receive log messages for all az_log_classification values.
[in] | classifications | [nullable] An array of az_log_classification values, terminated by AZ_LOG_END_OF_LIST. |