|
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 int32_t | az_log_classification |
Identifies the classifications of log messages produced by the SDK. More... | |
typedef void(* | az_log_message_fn) (az_log_classification classification, az_span message) |
Defines the signature of the callback function that application developers must provide to receive Azure SDK log messages. More... | |
typedef bool(* | az_log_classification_filter_fn) (az_log_classification classification) |
Defines the signature of the callback function that application developers must provide which will be used to check whether a particular log classification should be logged. More... | |
Enumerations | |
enum | az_log_classification_core { AZ_LOG_HTTP_REQUEST = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_CORE_HTTP, 1), AZ_LOG_HTTP_RESPONSE = _az_LOG_MAKE_CLASSIFICATION(_az_FACILITY_CORE_HTTP, 2), AZ_LOG_HTTP_RETRY } |
Identifies the az_log_classification produced by the SDK Core. More... | |
Functions | |
void | az_log_set_message_callback (az_log_message_fn log_message_callback) |
Sets the functions that will be invoked to report an SDK log message. More... | |
void | az_log_set_classification_filter_callback (az_log_classification_filter_fn message_filter_callback) |
Sets the functions that will be invoked to check whether an SDK log message should be reported. 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 int32_t az_log_classification |
Identifies the classifications of log messages produced by the SDK.
az_log_classification
values from various headers:
typedef bool(* az_log_classification_filter_fn) (az_log_classification classification) |
Defines the signature of the callback function that application developers must provide which will be used to check whether a particular log classification should be logged.
[in] | classification | The log message's az_log_classification. |
typedef void(* az_log_message_fn) (az_log_classification classification, az_span message) |
Defines the signature of the callback function that application developers must provide to receive Azure SDK log messages.
[in] | classification | The log message's az_log_classification. |
[in] | message | The log message. |
Identifies the az_log_classification produced by the SDK Core.
Enumerator | |
---|---|
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. |
void az_log_set_classification_filter_callback | ( | az_log_classification_filter_fn | message_filter_callback | ) |
Sets the functions that will be invoked to check whether an SDK log message should be reported.
[in] | message_filter_callback | [nullable] A pointer to the function that will be invoked when the SDK checks whether a log message of a particular az_log_classification should be logged. If NULL , log messages for all classifications will be logged, by passing them to the az_log_message_fn provided to az_log_set_message_callback(). |
NULL
, in which case no function is invoked to check whether a classification should be logged or not. The SDK assumes true, passing messages with any log classification to the az_log_message_fn provided to az_log_set_message_callback(). void az_log_set_message_callback | ( | az_log_message_fn | log_message_callback | ) |
Sets the functions that will be invoked to report an SDK log message.
[in] | log_message_callback | [nullable] A pointer to the function that will be invoked when the SDK reports a log message that should be logged according to the result of the az_log_classification_filter_fn provided to az_log_set_classification_filter_callback(). If NULL , no function will be invoked. |
NULL
, which means, no function is invoked.