Azure Kinect Sensor SDK  refs/heads/release/1.4.x
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_set_debug_message_handler()

k4a_result_t k4a_set_debug_message_handler ( k4a_logging_message_cb_t message_cb,
void *  message_cb_context,
k4a_log_level_t  min_level 
)

Sets and clears the callback function to receive debug messages from the Azure Kinect device.

Parameters
message_cbThe callback function to receive messages from. Set to NULL to unregister the callback function.
message_cb_contextThe callback functions context.
min_levelThe least critical error the user wants to be notified about.
Returns
K4A_RESULT_SUCCEEDED if the callback function was set or cleared successfully. K4A_RESULT_FAILED if an error is encountered or the callback function has already been set.
Remarks
Call this function to set or clear the callback function that is used to deliver debug messages to the caller. This callback may be called concurrently, it is up to the implementation of the callback function to ensure the parallelization is handled.
Clearing the callback function will block until all pending calls to the callback function have completed.
To update min_level, k4a_set_debug_message_handler can be called with the same value message_cb and by specifying a new min_level.
Logging provided via this API is independent of the logging controlled by the environmental variable controls K4A_ENABLE_LOG_TO_STDOUT, K4A_ENABLE_LOG_TO_A_FILE, and K4A_LOG_LEVEL. However there is a slight change in default behavior when using this function. By default, when k4a_set_debug_message_handler() has not been used to register a message callback, the default for environmental variable controls is to send debug messages as if K4A_ENABLE_LOG_TO_STDOUT=1 were set. If k4a_set_debug_message_handler registers a callback function before k4a_device_open() is called, then the default for environmental controls is as if K4A_ENABLE_LOG_TO_STDOUT=0 was specified. Physically specifying the environmental control will override the default.

min_level