Log Subscription
Subscribing to remote log streaming from the server (WatchLogs).
ti_set_log_callback
Register the server log callback.
Must be called before ti_start_log_subscription(). If no callback is registered, logs are discarded (the SDK has no built-in default output).
- client: Client handle.
- callback: Log callback function. Pass NULL to cancel the callback; logs will be discarded.
- user_data: User-defined data, passed through unchanged to the callback. May be NULL.
Note: The callback runs on the internal log thread; make sure it is thread-safe. See also:
ti_log_callback_tSee also:ti_start_log_subscription()
ti_stop_log_subscription
Stop the log subscription.
Safely closes the log stream and waits for the internal thread to exit; blocks until the thread has fully exited. Calling it when the subscription was not started is safe (no-op).
- client: Client handle.
- Returns:
TI_OK— stopped successfully - Returns:
TI_ERR_INVALID_ARG— client is NULL
See also: ti_start_log_subscription()