nabto_client_set_log_callback()

DESCRIPTION

Set a log callback.

The log callback is called synchronously from the core, this means it’s not allowed to call any nabto_client_* functions from the log callback as that would result in a deadlock. If it’s needed to react on a log message a queue is needed such that the invocation of the nabto client sdk can occur from another thread.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_set_log_callback(NabtoClient* context, NabtoClientLogCallback callback, void* data)

PARAMETERS

context:
[in]: The NabtoClient context to set the log callback on.
callback:
[in]: The callback function.
data:
[in]: Passed to the callback along with the log data.

RETURN VALUES

NABTO_CLIENT_EC_OK if ok.

EXAMPLES

None.